Simplify and fix wxWidgets find procedure with up to date find module

This commit is contained in:
tamasmeszaros 2023-08-04 14:10:50 +02:00
parent b6ed64428a
commit 831ea57483
2 changed files with 1224 additions and 19 deletions

File diff suppressed because it is too large Load Diff

View File

@ -49,26 +49,12 @@ if (SLIC3R_GUI)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux") if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}") set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}")
find_package(wxWidgets 3.2 QUIET COMPONENTS base core adv html gl)
if (NOT wxWidgets_FOUND)
message(FATAL_ERROR "Could not find wxWidgets >= 3.2")
endif ()
if (NOT "${wxWidgets_USE_FILE}" STREQUAL "")
include(${wxWidgets_USE_FILE})
endif ()
else ()
find_package(wxWidgets 3.2 COMPONENTS html adv gl core base)
if (NOT wxWidgets_FOUND)
message(STATUS "Trying to find wxWidgets in CONFIG mode...")
find_package(wxWidgets 3.2 CONFIG REQUIRED COMPONENTS html adv gl core base)
slic3r_remap_configs(wx::wxhtml wx::wxadv wx::wxgl wx::wxcore wx::wxbase RelWithDebInfo Release)
else ()
if (NOT "${wxWidgets_USE_FILE}" STREQUAL "")
include(${wxWidgets_USE_FILE})
endif ()
endif ()
endif () endif ()
find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl)
include(${wxWidgets_USE_FILE})
slic3r_remap_configs(wx::wxhtml wx::wxadv wx::wxgl wx::wxcore wx::wxbase RelWithDebInfo Release)
if(UNIX) if(UNIX)
message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}") message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}")