mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 23:01:36 +08:00
6e16931acd
* [wxWidgets] Remove debug asserts from Release build. Currently when building wxWidgets in Release mode, the debug asserts are enabled. This fixes this issue by providing a necessary define to disable them. Ref: https://docs.wxwidgets.org/3.1.6/group__group__funcmacro__debug.html [wxCharts, vcpkg-ci-wxwidgets] Update ports to include fix for wxWidgets release build with debug asserts off when building a dynamic/shared library. Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com> * Update wxcharts.json Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
32 lines
1.0 KiB
CMake
32 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.7)
|
|
|
|
project(wxwidgets-example)
|
|
|
|
option(wxBUILD_DEBUG_LEVEL "Debug Level" Default)
|
|
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
|
|
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
|
|
endif()
|
|
|
|
add_executable(main WIN32 popup.cpp)
|
|
|
|
find_package(wxWidgets REQUIRED)
|
|
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})
|
|
|
|
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()
|