Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31c801379..b5948674a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -33,6 +33,7 @@ if(PNG_FOUND AND NOT RASTERIZER_FORCE_BUILTIN_LIBPNG)
else()
set(ZLIB_LIBRARY "")
message(WARNING "Using builtin libpng. This can cause crashes on some platforms.")
+ set(SKIP_INSTALL_ALL 1) # Prevent png+zlib from creating install targets
add_subdirectory(png/zlib)
set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/png/zlib ${CMAKE_CURRENT_BINARY_DIR}/png/zlib)
include_directories(${ZLIB_INCLUDE_DIR})
@@ -49,7 +50,6 @@ if (SLIC3R_GUI)
if(WIN32)
message(STATUS "WXWIN environment set to: $ENV{WXWIN}")
elseif(UNIX)
- message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}")
set(wxWidgets_USE_UNICODE ON)
if(SLIC3R_STATIC)
set(wxWidgets_USE_STATIC ON)
@@ -58,7 +58,23 @@ 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 ()
+
+ if(UNIX)
+ message(STATUS "wx-config path: ${wxWidgets_CONFIG_EXECUTABLE}")
+ endif()
+
include(${wxWidgets_USE_FILE})
endif()
@@ -188,3 +204,15 @@ else ()
VERBATIM
)
endif()
+
+# Slic3r binary install target
+if (WIN32)
+ install(TARGETS slic3r RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ if (MSVC)
+ install(TARGETS slic3r_app_gui RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ install(TARGETS slic3r_app_console RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ install(TARGETS slic3r_app_noconsole RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ endif ()
+else ()
+ install(TARGETS slic3r RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+endif ()