diff options
author | Vojtech Kral <vojtech@kral.hk> | 2019-01-07 21:17:10 +0300 |
---|---|---|
committer | Vojtech Kral <vojtech@kral.hk> | 2019-01-09 20:43:29 +0300 |
commit | cde0aa4443b43b21956b12e932c5d70e3924a4db (patch) | |
tree | 29298a469087af63522d5d9e0e53e88c7a2a6cf4 /src/CMakeLists.txt | |
parent | 5aec48418a0a55c0a9d5d9df4f6f4e680647fcee (diff) |
Fix: wxWidgets 3.0 back-compat
Fix #1599
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa043cf9e..fd5a735d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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() |