Fix: wxWidgets 3.0 back-compat

Fix #1599
This commit is contained in:
Vojtech Kral 2019-01-07 19:17:10 +01:00
parent 5aec48418a
commit cde0aa4443
9 changed files with 40 additions and 15 deletions

View file

@ -59,7 +59,19 @@ if (SLIC3R_GUI)
endif()
endif()
find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (SLIC3R_WX_STABLE)
find_package(wxWidgets 3.0 REQUIRED COMPONENTS base core adv html gl)
else ()
find_package(wxWidgets 3.1 QUIET COMPONENTS base core adv html gl)
if (NOT wxWidgets_FOUND)
message(FATAL_ERROR "\nCould not find wxWidgets 3.1.\nHint: On Linux you can set -DSLIC3R_WX_STABLE=1 to use wxWidgets 3.0")
endif ()
endif ()
else ()
find_package(wxWidgets 3.1 REQUIRED COMPONENTS base core adv html gl)
endif ()
include(${wxWidgets_USE_FILE})
endif()