From d1c92ded7c82f064f677bd95e849d4117de96765 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 26 Jul 2022 11:14:28 +0200 Subject: [PATCH] Fix wxWidgets 3.2 not being found on windows --- src/CMakeLists.txt | 12 +++++++++--- src/slic3r/CMakeLists.txt | 2 -- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a093f639..13aceb998 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,18 +58,24 @@ if (SLIC3R_GUI) "Hint: On Linux you can set -DSLIC3R_WX_STABLE=1 to use wxWidgets 3.0\n") endif () endif () + + include(${wxWidgets_USE_FILE}) else () - find_package(wxWidgets 3.1 REQUIRED COMPONENTS html adv gl core base) + find_package(wxWidgets 3.1 COMPONENTS html adv gl core base) + if (wxWidgets_NOTFOUND) + find_package(wxWidgets 3.2 CONFIG REQUIRED COMPONENTS html adv gl core base) + else () + include(${wxWidgets_USE_FILE}) + endif () endif () if(UNIX) message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}") endif() - include(${wxWidgets_USE_FILE}) - find_package(JPEG QUIET) find_package(TIFF QUIET) + find_package(NanoSVG REQUIRED) string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES}) if (PNG_FOUND AND NOT WX_PNG_BUILTIN) diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 5657ea3a3..71a4941a4 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -257,8 +257,6 @@ set(SLIC3R_GUI_SOURCES Utils/WinRegistry.hpp ) -find_package(NanoSVG REQUIRED) - if (APPLE) list(APPEND SLIC3R_GUI_SOURCES Utils/RetinaHelperImpl.mm