diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 60d67553b..8e3d8ad4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -# Boost 1.63 requires CMake 3.7 or newer -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.2) project(Slic3r) @@ -23,6 +22,7 @@ option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" option(SLIC3R_PRUSACONTROL "Compile Slic3r with the PrusaControl prject file format (requires wxWidgets base library)" 1) option(SLIC3R_PROFILE "Compile Slic3r with an invasive Shiny profiler" 0) option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 1) +option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1) if (MSVC AND SLIC3R_MSVC_COMPILE_PARALLEL) add_compile_options(/MP) @@ -36,10 +36,18 @@ else() set(ENV_PATH_SEPARATOR ":") endif() set(ENV{PATH} "${PROJECT_SOURCE_DIR}/local-lib/bin${ENV_PATH_SEPARATOR}$ENV{PATH}") -set(ENV{PERL5LIB} "${PROJECT_SOURCE_DIR}/local-lib/lib/perl${ENV_PATH_SEPARATOR}$ENV{PERL5LIB}") +set(PERL_INCLUDE "${PROJECT_SOURCE_DIR}/local-lib/lib/perl5${ENV_PATH_SEPARATOR}$ENV{PERL5LIB}") message("PATH: $ENV{PATH}") -message("PERL5LIB: $ENV{PERL5LIB}") +message("PERL_INCLUDE: ${PERL_INCLUDE}") find_package(Perl REQUIRED) +if (WIN32) + # On Windows passing the PERL5LIB variable causes various problems (such as with MAX_PATH and others), + # basically I've found no good way to do it on Windows. + set(PERL5LIB_ENV_CMD "") +else() + set(PERL5LIB_ENV_CMD ${CMAKE_COMMAND} -E env PERL5LIB=${PERL_INCLUDE}) +endif() + # CMAKE_PREFIX_PATH is used to point CMake to the remaining dependencies (Boost, TBB, ...) # We pick it from environment if it is not defined in another way @@ -49,6 +57,8 @@ if(NOT DEFINED CMAKE_PREFIX_PATH) endif() endif() +enable_testing () + # WIN10SDK_PATH is used to point CMake to the WIN10 SDK installation directory. # We pick it from environment if it is not defined in another way if(WIN32) @@ -79,7 +89,6 @@ else () set(PERL_PROVE "${PERL_BIN_PATH}/prove") endif () -enable_testing () add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) |