diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/wxwidgets/example/CMakeLists.txt | |
Diffstat (limited to 'vcpkg/ports/wxwidgets/example/CMakeLists.txt')
| -rw-r--r-- | vcpkg/ports/wxwidgets/example/CMakeLists.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vcpkg/ports/wxwidgets/example/CMakeLists.txt b/vcpkg/ports/wxwidgets/example/CMakeLists.txt new file mode 100644 index 0000000..11d3084 --- /dev/null +++ b/vcpkg/ports/wxwidgets/example/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.7) + +project(wxwidgets-example) + +add_executable(main WIN32 popup.cpp) + +find_package(wxWidgets REQUIRED) +target_compile_features(main PRIVATE cxx_std_11) +target_compile_definitions(main PRIVATE ${wxWidgets_DEFINITIONS} "$<$<CONFIG:DEBUG>:${wxWidgets_DEFINITIONS_DEBUG}>") +target_include_directories(main PRIVATE ${wxWidgets_INCLUDE_DIRS}) +target_link_libraries(main PRIVATE ${wxWidgets_LIBRARIES}) + +add_executable(main2 WIN32 popup.cpp) + +find_package(wxWidgets CONFIG REQUIRED) +target_link_libraries(main2 PRIVATE wx::core wx::base) +target_compile_features(main2 PRIVATE cxx_std_11) + +option(USE_WXRC "Use the wxrc resource compiler" ON) +if(USE_WXRC) + execute_process( + COMMAND "${wxWidgets_wxrc_EXECUTABLE}" --help + RESULTS_VARIABLE error_result + ) + if(error_result) + message(FATAL_ERROR "Failed to run wxWidgets_wxrc_EXECUTABLE (${wxWidgets_wxrc_EXECUTABLE})") + endif() +endif() + +set(PRINT_VARS "" CACHE STRING "Variables to print at the end of configuration") +foreach(var IN LISTS PRINT_VARS) + message(STATUS "${var}:=${${var}}") +endforeach() |