From b578b7ec8714cfe783d1497793bdbbceca03b285 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Thu, 2 Apr 2020 11:42:45 +0200 Subject: [PATCH] New parameter DEP_WX_GTK3=on/off to build wxWidgets against GTK3. --- deps/CMakeLists.txt | 1 + deps/deps-linux.cmake | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 3935e38c3..8702fd6d6 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -35,6 +35,7 @@ set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination direct option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON) option(DEP_WX_STABLE "Build against wxWidgets stable 3.0 as opposed to default 3.1 (Linux only)" OFF) +option(DEP_WX_GTK3 "Build wxWidgets against GTK3" OFF) # On developer machines, it can be enabled to speed up compilation and suppress warnings coming from IGL. # FIXME: diff --git a/deps/deps-linux.cmake b/deps/deps-linux.cmake index 3727eba7b..01f7ab21b 100644 --- a/deps/deps-linux.cmake +++ b/deps/deps-linux.cmake @@ -99,6 +99,12 @@ else () set(DEP_WX_TAG "v3.1.1-patched") endif() +if (DEP_WX_GTK3) + set(WX_GTK_VERSION "3") +else () + set(WX_GTK_VERSION "2") +endif() + ExternalProject_Add(dep_wxwidgets EXCLUDE_FROM_ALL 1 GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets" @@ -108,7 +114,7 @@ ExternalProject_Add(dep_wxwidgets CONFIGURE_COMMAND ./configure "--prefix=${DESTDIR}/usr/local" --disable-shared - --with-gtk=2 + --with-gtk=${WX_GTK_VERSION} --with-opengl --enable-unicode --enable-graphics_ctx