diff options
author | bubnikv <bubnikv@gmail.com> | 2017-08-29 00:11:43 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-08-29 00:11:43 +0300 |
commit | ff4e8d94c0bbd17cc58e066802c77ab75c5ec95c (patch) | |
tree | ffd68a368a5857d858f256752517967bb684444f /CMakeLists.txt | |
parent | d5c2c252a51d3944a11b72a97448fe351ac42b20 (diff) |
CMake build process: Workaround for an old CMake on Linux.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 65b326d4a..43d7dee70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |