I am trying to build a cross platform text editor with wxWidgets. I used cmake to statically compile wxWidgets and use cmake to compile my own application. I am using the wxPrivateFont system to integrate custom fonts. I have followed the "CMake Overview" tutorial for instruction. I build wxWidgets using:
Code: Select all
cmake ~/CLionProjects/Radon/dep/wxWidgets -DCMAKE_INSTALL_PREFIX=~/CLionProjects/Radon/dep/wxWidgets-build -DwxBUILD_SHARED=OFF
Code: Select all
cmake --build . --target install
Code: Select all
find_package(wxWidgets 3.1 COMPONENTS core base richtext adv html xml REQUIRED)
include(${wxWidgets_USE_FILE})
set(SRC_FILES
src/Main.cpp
src/App.cpp
src/Main.h
src/App.h
)
# Define the build target for the executable
add_executable(${PROJECT_NAME} ${SRC_FILES})
# Link required libraries to the executable
target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
I tried adding all wxWidgets components but that doesn't change anything. I've been stuck here for a few months now.