CMake: Fix building samples with MinGW64

Do not enable debugrpt and flash examples.
Define UNICODE when building on Windows. This allows the sdk_exe example to build, because it includes the windows headers directly.
This commit is contained in:
Maarten Bent 2018-01-20 17:30:25 +01:00
parent 6d12732f52
commit 5ca19288f6
2 changed files with 9 additions and 2 deletions

View File

@ -166,6 +166,9 @@ function(wx_set_target_properties target_name is_base)
endif()
if(wxUSE_UNICODE)
if(WIN32)
target_compile_definitions(${target_name} PUBLIC UNICODE)
endif()
target_compile_definitions(${target_name} PUBLIC _UNICODE)
endif()

View File

@ -19,7 +19,9 @@ wx_add_sample(combo LIBRARIES adv DATA dropbuth.png dropbutn.png dropbutp.png)
wx_add_sample(config conftest.cpp)
wx_add_sample(console CONSOLE IMPORTANT)
wx_add_sample(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h LIBRARIES adv)
wx_add_sample(debugrpt LIBRARIES qa)
if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC))
wx_add_sample(debugrpt LIBRARIES qa)
endif()
wx_add_sample(dialogs dialogs.cpp dialogs.h LIBRARIES adv DATA tips.txt)
wx_add_sample(dialup nettest.cpp)
wx_add_sample(display)
@ -229,7 +231,9 @@ if(WIN32)
endif()
wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll LIBRARIES my_dll)
wx_add_sample(flash)
if(MSVC)
wx_add_sample(flash)
endif()
#TODO: renable when sample is fixed
#wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc)
wx_add_sample(nativdlg nativdlg.cpp nativdlg.h resource.h RES nativdlg.rc)