Make: Fix regression when enable samples and Enable MSVC Multiprocessor
Compilation.

See https://github.com/wxWidgets/wxWidgets/pull/725
This commit is contained in:
Vadim Zeitlin
2018-02-16 13:16:53 +01:00
3 changed files with 7 additions and 1 deletions

View File

@@ -22,6 +22,11 @@ if(DEFINED wxBUILD_USE_STATIC_RUNTIME AND wxBUILD_USE_STATIC_RUNTIME)
endforeach()
endif()
if(wxBUILD_MSVC_MULTIPROC)
wx_string_append(CMAKE_C_FLAGS " /MP")
wx_string_append(CMAKE_CXX_FLAGS " /MP")
endif()
if(wxBUILD_COMPATIBILITY VERSION_LESS 3.0)
set(WXWIN_COMPATIBILITY_2_8 ON)
endif()

View File

@@ -25,6 +25,7 @@ mark_as_advanced(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
if(MSVC)
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" OFF)
wx_option(wxBUILD_MSVC_MULTIPROC "Enable multi-processor compilation for MSVC")
else()
# Other compilers support setting the C++ standard, present it an option to the user
if(DEFINED CMAKE_CXX_STANDARD)

View File

@@ -123,7 +123,7 @@ endif()
wx_add_sample(sound RES sound.rc DATA 9000g.wav cuckoo.wav doggrowl.wav tinkalink2.wav LIBRARIES adv DEPENDS wxUSE_SOUND)
wx_add_sample(splash DATA splash.png press.mpg LIBRARIES adv DEPENDS wxUSE_SPLASH)
if(TARGET splash AND wxUSE_MEDIACTRL)
target_link_libraries(splash media)
wx_exe_link_libraries(splash media)
endif()
wx_add_sample(splitter DEPENDS wxUSE_SPLITTER)
wx_add_sample(statbar DEPENDS wxUSE_STATUSBAR)