From 3ae0ca9d0e47d253840349063f30efdd2427cadc Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 23 Mar 2018 21:50:39 +0100 Subject: [PATCH 1/4] CMake: Fix adding access and dll samples --- build/cmake/samples/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/cmake/samples/CMakeLists.txt b/build/cmake/samples/CMakeLists.txt index bb0a87e23e..9e9146268b 100644 --- a/build/cmake/samples/CMakeLists.txt +++ b/build/cmake/samples/CMakeLists.txt @@ -7,7 +7,7 @@ # Licence: wxWindows licence ############################################################################# -wx_add_sample(access accesstest.cpp DEPENDS wxUSE_ACCESSBILITY) +wx_add_sample(access accesstest.cpp DEPENDS wxUSE_ACCESSIBILITY) wx_add_sample(animate anitest.cpp anitest.h LIBRARIES adv DATA throbber.gif hourglass.ani DEPENDS wxUSE_ANIMATIONCTRL) wx_add_sample(archive CONSOLE) wx_add_sample(artprov arttest.cpp artbrows.cpp artbrows.h) @@ -231,7 +231,7 @@ if(WIN32) # Windows only samples # DLL Sample - if(wxUSE_DYNLIBCLASS) + if(wxUSE_DYNLIB_CLASS) wx_add_sample(dll DLL my_dll.cpp my_dll.h NAME my_dll FOLDER dll DEFINITIONS MY_DLL_BUILDING) if(NOT wxBUILD_SHARED) From e2ddc3e863fd38623eac8f5149ab8368bb62e703 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 23 Mar 2018 21:58:39 +0100 Subject: [PATCH 2/4] CMake: Fix GTK3 Win32 build Add 'BEFORE' to target_include_directories so we include the headers of the buildin third-party libraries before headers of third-party libraries included in wxTOOLKIT_INCLUDE_DIRS. --- build/cmake/functions.cmake | 2 +- build/cmake/lib/adv/CMakeLists.txt | 6 +++++- build/cmake/lib/aui/CMakeLists.txt | 2 +- build/cmake/lib/core/CMakeLists.txt | 9 +++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 9af05bd939..f699234816 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -378,7 +378,7 @@ macro(wx_lib_include_directories name) list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC}) list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE}) else() - target_include_directories(${name};${ARGN}) + target_include_directories(${name};BEFORE;${ARGN}) endif() endmacro() diff --git a/build/cmake/lib/adv/CMakeLists.txt b/build/cmake/lib/adv/CMakeLists.txt index 9db332822c..c653d82f55 100644 --- a/build/cmake/lib/adv/CMakeLists.txt +++ b/build/cmake/lib/adv/CMakeLists.txt @@ -18,7 +18,11 @@ if(WXMSW) elseif(WXOSX_COCOA) wx_append_sources(ADV_FILES ADVANCED_OSX_COCOA) elseif(WXGTK) - wx_append_sources(ADV_FILES ADVANCED_GTK2) + if(WXGTK2) + wx_append_sources(ADV_FILES ADVANCED_GTK2) + else() + wx_append_sources(ADV_FILES ADVANCED_GTK) + endif() wx_append_sources(ADV_FILES ADVANCED_GTK_NATIVE) endif() diff --git a/build/cmake/lib/aui/CMakeLists.txt b/build/cmake/lib/aui/CMakeLists.txt index ba369af670..1ce816a851 100644 --- a/build/cmake/lib/aui/CMakeLists.txt +++ b/build/cmake/lib/aui/CMakeLists.txt @@ -13,7 +13,7 @@ wx_append_sources(AUI_FILES AUI_CMN) if(WXMSW) wx_append_sources(AUI_FILES AUI_MSW) -elseif(WXGTK) +elseif(WXGTK2) wx_append_sources(AUI_FILES AUI_GTK) endif() diff --git a/build/cmake/lib/core/CMakeLists.txt b/build/cmake/lib/core/CMakeLists.txt index 809b50b9b0..d9847854e2 100644 --- a/build/cmake/lib/core/CMakeLists.txt +++ b/build/cmake/lib/core/CMakeLists.txt @@ -25,8 +25,13 @@ if(WXMSW) wx_append_sources(CORE_SRC MSW) wx_append_sources(CORE_SRC MSW_DESKTOP) elseif(WXGTK) - wx_append_sources(CORE_SRC GTK2_LOWLEVEL) - wx_append_sources(CORE_SRC GTK2) + if(WXGTK2) + wx_append_sources(CORE_SRC GTK2_LOWLEVEL) + wx_append_sources(CORE_SRC GTK2) + else() + wx_append_sources(CORE_SRC GTK_LOWLEVEL) + wx_append_sources(CORE_SRC GTK) + endif() wx_append_sources(CORE_SRC XWIN_LOWLEVEL) elseif(WXOSX_COCOA) From e4c0beac257b65bfc758e7cbd8d9a590937cba90 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 23 Mar 2018 21:59:38 +0100 Subject: [PATCH 3/4] CMake: Remove duplicate wxUSE_IMAGE option --- build/cmake/lib/core/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/cmake/lib/core/CMakeLists.txt b/build/cmake/lib/core/CMakeLists.txt index d9847854e2..01edc85f35 100644 --- a/build/cmake/lib/core/CMakeLists.txt +++ b/build/cmake/lib/core/CMakeLists.txt @@ -9,8 +9,6 @@ include(../../source_groups.cmake) -wx_option(wxUSE_IMAGE "use wxImage class" ON) - wx_append_sources(CORE_SRC GUI_CMN) wx_append_sources(CORE_SRC BASE_AND_GUI_CMN) if(WIN32) From c103ab686c31bfde55b805dad24536c244119912 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 23 Mar 2018 22:00:29 +0100 Subject: [PATCH 4/4] CMake: Disable dialup sample in macOS --- build/cmake/options.cmake | 7 ++++++- build/cmake/samples/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index b01db3261f..de515cea0c 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -101,7 +101,12 @@ wx_option(wxUSE_ON_FATAL_EXCEPTION "catch signals in wxApp::OnFatalException") wx_option(wxUSE_CMDLINE_PARSER "use wxCmdLineParser class") wx_option(wxUSE_DATETIME "use wxDateTime class") wx_option(wxUSE_DEBUGREPORT "use wxDebugReport class") -wx_option(wxUSE_DIALUP_MANAGER "use dialup network classes") +if(APPLE) + set(wxUSE_DIALUP_MANAGER_DEFAULT OFF) +else() + set(wxUSE_DIALUP_MANAGER_DEFAULT ON) +endif() +wx_option(wxUSE_DIALUP_MANAGER "use dialup network classes" ${wxUSE_DIALUP_MANAGER_DEFAULT}) wx_option(wxUSE_DYNLIB_CLASS "use wxLibrary class for DLL loading") wx_option(wxUSE_DYNAMIC_LOADER "use (new) wxDynamicLibrary class") wx_option(wxUSE_EXCEPTIONS "build exception-safe library") diff --git a/build/cmake/samples/CMakeLists.txt b/build/cmake/samples/CMakeLists.txt index 9e9146268b..5916b03935 100644 --- a/build/cmake/samples/CMakeLists.txt +++ b/build/cmake/samples/CMakeLists.txt @@ -24,7 +24,7 @@ if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC)) wx_add_sample(debugrpt LIBRARIES qa DEPENDS wxUSE_DEBUGREPORT) endif() wx_add_sample(dialogs dialogs.cpp dialogs.h LIBRARIES adv DATA tips.txt) -wx_add_sample(dialup nettest.cpp DEPENDS wxUSE_DIALUP_MANAGER) +wx_add_sample(dialup nettest.cpp LIBRARIES net DEPENDS wxUSE_DIALUP_MANAGER) wx_add_sample(display DEPENDS wxUSE_DISPLAY) wx_add_sample(dnd dnd.cpp RES dnd.rc DATA wxwin.png DEPENDS wxUSE_DRAG_AND_DROP) wx_add_sample(docview docview.cpp doc.cpp view.cpp docview.h doc.h view.h