CMake build process: Workaround for an old CMake on Linux.

This commit is contained in:
bubnikv 2017-08-28 23:11:43 +02:00
parent d5c2c252a5
commit ff4e8d94c0
2 changed files with 14 additions and 5 deletions

View file

@ -8,11 +8,15 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
endif()
if (MSVC OR MINGW OR APPLE)
set(SLIC3R_STATIC_INITIAL 1)
else ()
set(SLIC3R_STATIC_INITIAL 0)
endif ()
if(DEFINED ENV{SLIC3R_STATIC})
set(SLIC3R_STATIC_INITIAL $ENV{SLIC3R_STATIC})
else()
if (MSVC OR MINGW OR APPLE)
set(SLIC3R_STATIC_INITIAL 1)
else()
set(SLIC3R_STATIC_INITIAL 0)
endif()
endif()
option(SLIC3R_STATIC "Compile Slic3r with static libraries (Boost, TBB, glew)" ${SLIC3R_STATIC_INITIAL})
option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" 1)