From 64801faff3ccc138b9cf999fa7f109388e701b35 Mon Sep 17 00:00:00 2001 From: thysson2701 Date: Fri, 12 Jun 2026 20:19:36 +0200 Subject: [PATCH] fix(stable): wx 3.3 CONFIG-Modus auf Windows (wxWidgets_DIR statt WXWIN) Der Modul-Modus von find_package(wxWidgets) ignoriert wxWidgets_DIR und sucht nur WXWIN/wx-config, das auf dem Windows-Builder leer ist. wx 3.3 liefert CMake-Config-Files; CONFIG-Modus nutzt sie wie im 2.4-Branch. wxWidgets_USE_FILE wird im CONFIG-Modus nicht gesetzt -> include gewrappt. --- src/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ce9ef27b930..3e9d76f165a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,14 +36,21 @@ if (SLIC3R_GUI) find_package(wxWidgets 3.1 REQUIRED COMPONENTS base core adv html gl aui net media webview) endif () else () - find_package(wxWidgets 3.1 REQUIRED COMPONENTS html adv gl core base webview aui net media) + # wxWidgets 3.3 ships CMake config files; use CONFIG mode so wxWidgets_DIR + # is honored. The legacy FindwxWidgets module ignores wxWidgets_DIR and + # only probes WXWIN/wx-config, which is unset on the Windows builder. + find_package(wxWidgets 3.3 CONFIG REQUIRED COMPONENTS html adv gl core base webview aui net media) endif () if(UNIX) message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}") endif() - include(${wxWidgets_USE_FILE}) + # CONFIG mode (Windows, wx 3.3) does not set wxWidgets_USE_FILE; only the + # legacy module mode (Linux wx-config) does. Guard the include accordingly. + if(wxWidgets_USE_FILE) + include(${wxWidgets_USE_FILE}) + endif() find_package(JPEG QUIET)