CMake build process: Workaround for an old CMake on Linux.
This commit is contained in:
parent
d5c2c252a5
commit
ff4e8d94c0
@ -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)
|
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC OR MINGW OR APPLE)
|
if(DEFINED ENV{SLIC3R_STATIC})
|
||||||
set(SLIC3R_STATIC_INITIAL 1)
|
set(SLIC3R_STATIC_INITIAL $ENV{SLIC3R_STATIC})
|
||||||
else ()
|
else()
|
||||||
set(SLIC3R_STATIC_INITIAL 0)
|
if (MSVC OR MINGW OR APPLE)
|
||||||
endif ()
|
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_STATIC "Compile Slic3r with static libraries (Boost, TBB, glew)" ${SLIC3R_STATIC_INITIAL})
|
||||||
option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" 1)
|
option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" 1)
|
||||||
|
@ -5,6 +5,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
# Add our own cmake module path.
|
# Add our own cmake module path.
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/)
|
||||||
|
|
||||||
|
if (UNIX)
|
||||||
|
# Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD.
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Where all the bundled libraries reside?
|
# Where all the bundled libraries reside?
|
||||||
set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
||||||
# For the bundled boost libraries (boost::nowide)
|
# For the bundled boost libraries (boost::nowide)
|
||||||
|
Loading…
Reference in New Issue
Block a user