diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a061bf06..b405bcce9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ 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) option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0) option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0) +option(SLIC3R_ALPHA "Development/Experimental version; use separate profile directory." OFF) set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index cd329c334..528841aba 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -347,6 +347,8 @@ if(SLIC3R_PROFILE) target_link_libraries(libslic3r Shiny) endif() +target_compile_definitions(libslic3r PRIVATE $<$:SLIC3R_ALPHA>) + if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY) add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE) endif () diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 3c8769ed5..452cb2f68 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -1,6 +1,12 @@ cmake_minimum_required(VERSION 3.13) project(libslic3r_gui) +if(NOT WIN32) + # Add DEBUG flags to debug builds. + add_compile_options(${_CC_DEBUG_FLAGS}) +endif() + + include(PrecompiledHeader) set(SLIC3R_GUI_SOURCES @@ -247,6 +253,7 @@ if (APPLE) endif () add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES}) +target_compile_definitions(libslic3r_gui PRIVATE $<$:SLIC3R_ALPHA>) encoding_check(libslic3r_gui) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 43e6eb382..e1ece8ad9 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -700,9 +700,12 @@ bool GUI_App::init_opengl() void GUI_App::init_app_config() { - // Profiles for the alpha are stored into the PrusaSlicer-alpha directory to not mix with the current release. -// SetAppName(SLIC3R_APP_KEY); - SetAppName(SLIC3R_APP_KEY "-alpha"); + #ifdef SLIC3R_ALPHA + // Profiles for the alpha are stored into the PrusaSlicer-alpha directory to not mix with the current release. + SetAppName(SLIC3R_APP_KEY "-alpha"); + #else + SetAppName(SLIC3R_APP_KEY); + #endif // SetAppDisplayName(SLIC3R_APP_NAME); // Set the Slic3r data directory at the Slic3r XS module.