2024-01-25 12:56:32 +08:00
|
|
|
cmake_minimum_required (VERSION 3.8)
|
|
|
|
project (wxWidgetStudy)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
|
2024-05-09 15:47:41 +08:00
|
|
|
set(CMAKE_PREFIX_PATH "C:/dev/wxWidgets")
|
2024-01-25 12:56:32 +08:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
endif()
|
|
|
|
if (MSVC)
|
|
|
|
add_compile_options(/source-charset:utf-8)
|
|
|
|
add_compile_options(/EHsc)
|
|
|
|
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(wxWidgets REQUIRED COMPONENTS core base)
|
|
|
|
include(${wxWidgets_USE_FILE})
|
|
|
|
|
2024-05-09 15:47:41 +08:00
|
|
|
add_subdirectory(console)
|
|
|
|
|
2024-01-25 12:56:32 +08:00
|
|
|
add_executable(wxWidgetStudy main.cpp)
|
2024-01-25 14:34:10 +08:00
|
|
|
add_executable(wxEvent event_binary.cpp src/event_demo.cpp)
|
2024-01-25 14:52:04 +08:00
|
|
|
add_executable(wxWindowSign window_sign_bin.cpp src/window_sign.cpp)
|
2024-05-09 15:47:41 +08:00
|
|
|
|
2024-01-25 12:56:32 +08:00
|
|
|
target_link_libraries(wxWidgetStudy PRIVATE ${wxWidgets_LIBRARIES})
|
2024-01-25 14:14:28 +08:00
|
|
|
target_link_libraries(wxEvent PRIVATE ${wxWidgets_LIBRARIES})
|
2024-01-25 14:52:04 +08:00
|
|
|
target_link_libraries(wxWindowSign PRIVATE ${wxWidgets_LIBRARIES})
|
2024-01-25 12:56:32 +08:00
|
|
|
|
2024-01-25 14:14:28 +08:00
|
|
|
set_target_properties(wxWidgetStudy PROPERTIES WIN32_EXECUTABLE TRUE)
|
2024-01-25 14:52:04 +08:00
|
|
|
set_target_properties(wxEvent PROPERTIES WIN32_EXECUTABLE TRUE)
|
|
|
|
set_target_properties(wxWindowSign PROPERTIES WIN32_EXECUTABLE TRUE)
|