diff --git a/CMakeLists.txt b/CMakeLists.txt
index edbc082bd29..606b9494c48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,13 +13,13 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
if(DEFINED ENV{SLIC3R_STATIC})
- set(SLIC3R_STATIC_INITIAL $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()
+ 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})
@@ -52,21 +52,9 @@ if (SLIC3R_GUI)
add_definitions(-DSLIC3R_GUI)
endif ()
-if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
- set(IS_CLANG_CL TRUE)
-
- # clang-cl can interpret SYSTEM header paths if -imsvc is used
- set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-imsvc")
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall \
- -Wno-old-style-cast -Wno-reserved-id-macro -Wno-c++98-compat-pedantic")
-else ()
- set(IS_CLANG_CL FALSE)
-endif ()
-
if (MSVC)
- if (SLIC3R_MSVC_COMPILE_PARALLEL AND NOT IS_CLANG_CL)
- add_compile_options(/MP)
+ if (SLIC3R_MSVC_COMPILE_PARALLEL)
+ add_compile_options(/MP)
endif ()
# /bigobj (Increase Number of Sections in .Obj file)
# error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm90' or greater
@@ -74,10 +62,6 @@ if (MSVC)
add_compile_options(-bigobj -Zm520 /Zi)
endif ()
-if (MINGW)
- add_compile_options(-Wa,-mbig-obj)
-endif ()
-
# Display and check CMAKE_PREFIX_PATH
message(STATUS "SLIC3R_STATIC: ${SLIC3R_STATIC}")
if (NOT "${CMAKE_PREFIX_PATH}" STREQUAL "")
@@ -117,17 +101,17 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# 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)
- if(NOT DEFINED WIN10SDK_PATH)
- if(DEFINED ENV{WIN10SDK_PATH})
- set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}")
- endif()
- endif()
- if(DEFINED WIN10SDK_PATH AND NOT EXISTS "${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h")
- message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}")
- message("${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h was not found")
- message("STL fixing by the Netfabb service will not be compiled")
- unset(WIN10SDK_PATH)
- endif()
+ if(NOT DEFINED WIN10SDK_PATH)
+ if(DEFINED ENV{WIN10SDK_PATH})
+ set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}")
+ endif()
+ endif()
+ if(DEFINED WIN10SDK_PATH AND NOT EXISTS "${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h")
+ message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}")
+ message("${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h was not found")
+ message("STL fixing by the Netfabb service will not be compiled")
+ unset(WIN10SDK_PATH)
+ endif()
if(WIN10SDK_PATH)
message("Building with Win10 Netfabb STL fixing service support")
add_definitions(-DHAS_WIN10SDK)
@@ -164,19 +148,17 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals" )
endif()
-if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
- if (NOT MINGW)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
- endif ()
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder" )
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
add_compile_options(-Werror=return-type)
#removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
- #if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.1)
- # add_compile_options(-Wno-ignored-attributes) # Tamas: Eigen include dirs are marked as SYSTEM
- #endif()
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.1)
+ add_compile_options(-Wno-ignored-attributes) # Tamas: Eigen include dirs are marked as SYSTEM
+ endif()
#GCC generates loads of -Wunknown-pragmas when compiling igl. The fix is not easy due to a bug in gcc, see
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 or
@@ -186,6 +168,7 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
add_compile_options(-Wno-unknown-pragmas)
endif()
+
if (SLIC3R_ASAN)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
@@ -213,12 +196,9 @@ include_directories(${LIBDIR_BIN}/platform)
include_directories(${LIBDIR}/clipper ${LIBDIR}/polypartition)
if(WIN32)
- add_definitions(-D_USE_MATH_DEFINES -D_WIN32 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
- if(MSVC)
- # BOOST_ALL_NO_LIB: Avoid the automatic linking of Boost libraries on Windows. Rather rely on explicit linking.
- add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x601 )
- endif(MSVC)
-endif(WIN32)
+ # BOOST_ALL_NO_LIB: Avoid the automatic linking of Boost libraries on Windows. Rather rely on explicit linking.
+ add_definitions(-D_USE_MATH_DEFINES -D_WIN32 -DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x601 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
+endif()
add_definitions(-DwxUSE_UNICODE -D_UNICODE -DUNICODE -DWXINTL_NO_GETTEXT_MACRO)
@@ -249,7 +229,7 @@ if(SLIC3R_STATIC)
# set(Boost_USE_STATIC_RUNTIME ON)
endif()
#set(Boost_DEBUG ON)
-# set(Boost_COMPILER "-mgw81")
+# set(Boost_COMPILER "-vc120")
if(NOT WIN32)
# boost::process was introduced first in version 1.64.0
set(MINIMUM_BOOST_VERSION "1.64.0")
@@ -271,7 +251,7 @@ endif()
if(TARGET Boost::system)
message(STATUS "Boost::boost exists")
target_link_libraries(boost_headeronly INTERFACE Boost::boost)
- target_link_libraries(boost_libs INTERFACE
+ target_link_libraries(boost_libs INTERFACE
boost_headeronly # includes the custom compile definitions as well
Boost::system
Boost::filesystem
@@ -368,7 +348,7 @@ target_include_directories(cereal INTERFACE include)
# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
add_custom_target(pot
- COMMAND xgettext --keyword=L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
+ COMMAND xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug
-f "${L10N_DIR}/list.txt"
-o "${L10N_DIR}/Slic3r++.pot"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
@@ -398,10 +378,8 @@ endif()
# Resources install target, configure fhs.hpp on UNIX
if (WIN32)
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
-elseif (SLIC3R_FHS)
+else ()
set(SLIC3R_FHS_RESOURCES "${CMAKE_INSTALL_FULL_DATAROOTDIR}/slic3r++")
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${SLIC3R_FHS_RESOURCES}")
-else ()
- install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
endif ()
configure_file(${LIBDIR}/platform/unix/fhs.hpp.in ${LIBDIR_BIN}/platform/unix/fhs.hpp)
diff --git a/cmake/modules/PrecompiledHeader.cmake b/cmake/modules/PrecompiledHeader.cmake
index 2f62a7dbeb6..e4630214411 100644
--- a/cmake/modules/PrecompiledHeader.cmake
+++ b/cmake/modules/PrecompiledHeader.cmake
@@ -105,9 +105,6 @@ function(add_precompiled_header _target _input)
cmake_parse_arguments(_PCH "FORCEINCLUDE" "SOURCE_CXX;SOURCE_C" "" ${ARGN})
get_filename_component(_input_we ${_input} NAME_WE)
- get_filename_component(_input_full ${_input} ABSOLUTE)
- file(TO_NATIVE_PATH "${_input_full}" _input_fullpath)
-
if(NOT _PCH_SOURCE_CXX)
set(_PCH_SOURCE_CXX "${_input_we}.cpp")
endif()
@@ -141,16 +138,16 @@ function(add_precompiled_header _target _input)
set_source_files_properties("${_source}" PROPERTIES OBJECT_OUTPUTS "${_pch_c_pch}")
else()
if(_source MATCHES \\.\(cpp|cxx|cc\)$)
- set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_cxx_pch}\" \"/Yu${_input_fullpath}\"")
+ set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_cxx_pch}\" \"/Yu${_input}\"")
set(_pch_source_cxx_needed TRUE)
set_source_files_properties("${_source}" PROPERTIES OBJECT_DEPENDS "${_pch_cxx_pch}")
else()
- set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_c_pch}\" \"/Yu${_input_fullpath}\"")
+ set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_c_pch}\" \"/Yu${_input}\"")
set(_pch_source_c_needed TRUE)
set_source_files_properties("${_source}" PROPERTIES OBJECT_DEPENDS "${_pch_c_pch}")
endif()
if(_PCH_FORCEINCLUDE)
- set(_pch_compile_flags "${_pch_compile_flags} /FI${_input_fullpath}")
+ set(_pch_compile_flags "${_pch_compile_flags} /FI${_input}")
endif(_PCH_FORCEINCLUDE)
endif()
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 9da42446d71..ba01c0a7ec6 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -75,10 +75,7 @@ elseif (APPLE)
endif ()
include("deps-macos.cmake")
-elseif (MINGW)
- message(STATUS "Building for MinGW...")
- include("deps-mingw.cmake")
-else()
+else ()
include("deps-linux.cmake")
endif()
diff --git a/deps/deps-mingw.cmake b/deps/deps-mingw.cmake
deleted file mode 100644
index bfe5f9fe436..00000000000
--- a/deps/deps-mingw.cmake
+++ /dev/null
@@ -1,76 +0,0 @@
-set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
-set(DEP_BOOST_TOOLSET "gcc")
-set(DEP_BITS 64)
-
-find_package(Git REQUIRED)
-
-# TODO make sure to build tbb with -flifetime-dse=1
-include("deps-unix-common.cmake")
-
-ExternalProject_Add(dep_boost
- EXCLUDE_FROM_ALL 1
- URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
- URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND bootstrap.bat
- BUILD_COMMAND b2.exe
- -j "${NPROC}"
- --with-system
- --with-filesystem
- --with-thread
- --with-log
- --with-locale
- --with-regex
- "--prefix=${DESTDIR}/usr/local"
- "address-model=${DEPS_BITS}"
- "toolset=${DEP_BOOST_TOOLSET}"
- link=static
- define=BOOST_USE_WINAPI_VERSION=0x0502
- variant=release
- threading=multi
- boost.locale.icu=off
- "${DEP_BOOST_DEBUG}" release install
- INSTALL_COMMAND "" # b2 does that already
-)
-
-ExternalProject_Add(dep_libcurl
- EXCLUDE_FROM_ALL 1
- URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
- URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DBUILD_TESTING=OFF
- -DCURL_STATICLIB=ON
- -DCURL_STATIC_CRT=ON
- -DENABLE_THREADED_RESOLVER=ON
- -DCURL_DISABLE_FTP=ON
- -DCURL_DISABLE_LDAP=ON
- -DCURL_DISABLE_LDAPS=ON
- -DCURL_DISABLE_TELNET=ON
- -DCURL_DISABLE_DICT=ON
- -DCURL_DISABLE_FILE=ON
- -DCURL_DISABLE_TFTP=ON
- -DCURL_DISABLE_RTSP=ON
- -DCURL_DISABLE_POP3=ON
- -DCURL_DISABLE_IMAP=ON
- -DCURL_DISABLE_SMTP=ON
- -DCURL_DISABLE_GOPHER=ON
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${DEP_CMAKE_OPTS}
-)
-
-ExternalProject_Add(dep_wxwidgets
- EXCLUDE_FROM_ALL 1
- GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
- GIT_TAG v3.1.1-patched
-# URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.tar.bz2"
-# URL_HASH SHA256=c925dfe17e8f8b09eb7ea9bfdcfcc13696a3e14e92750effd839f5e10726159e
-# PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}\\wxwidgets-pngprefix.h" src\\png\\pngprefix.h
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DwxUSE_LIBPNG=builtin
- -DwxUSE_ZLIB=builtin
- -DwxUSE_OPENGL=ON
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${DEP_CMAKE_OPTS}
-)
\ No newline at end of file
diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake
index 6e559d05a37..e323460a6d4 100644
--- a/deps/deps-unix-common.cmake
+++ b/deps/deps-unix-common.cmake
@@ -1,12 +1,6 @@
# The unix common part expects DEP_CMAKE_OPTS to be set
-if (MINGW)
- set(TBB_MINGW_WORKAROUND "-flifetime-dse=1")
-else ()
- set(TBB_MINGW_WORKAROUND "")
-endif ()
-
ExternalProject_Add(dep_tbb
EXCLUDE_FROM_ALL 1
URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
@@ -14,7 +8,6 @@ ExternalProject_Add(dep_tbb
CMAKE_ARGS
-DTBB_BUILD_SHARED=OFF
-DTBB_BUILD_TESTS=OFF
- -DCMAKE_CXX_FLAGS=${TBB_MINGW_WORKAROUND}
-DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
${DEP_CMAKE_OPTS}
)
diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake
index 2c65fc81f4a..4162488cd88 100644
--- a/deps/deps-windows.cmake
+++ b/deps/deps-windows.cmake
@@ -19,10 +19,6 @@ else ()
message(FATAL_ERROR "Unsupported MSVC version")
endif ()
-if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
- set(DEP_BOOST_TOOLSET "clang-win")
-endif ()
-
if (${DEPS_BITS} EQUAL 32)
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER}")
# set(DEP_PLATFORM "Win32")
diff --git a/resources/icons/edit_layers_all.svg b/resources/icons/edit_layers_all.svg
index fe4f26c52cc..4fccc1388d9 100644
--- a/resources/icons/edit_layers_all.svg
+++ b/resources/icons/edit_layers_all.svg
@@ -3,23 +3,39 @@
diff --git a/resources/icons/edit_layers_some.svg b/resources/icons/edit_layers_some.svg
index fb1e7f8b178..7db56b3f098 100644
--- a/resources/icons/edit_layers_some.svg
+++ b/resources/icons/edit_layers_some.svg
@@ -2,13 +2,68 @@
diff --git a/resources/icons/eye_closed.svg b/resources/icons/eye_closed.svg
deleted file mode 100644
index 127d53ca3b7..00000000000
--- a/resources/icons/eye_closed.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
diff --git a/resources/icons/eye_open.svg b/resources/icons/eye_open.svg
deleted file mode 100644
index a87cf3a83fa..00000000000
--- a/resources/icons/eye_open.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/resources/icons/lock_closed_f.svg b/resources/icons/lock_closed_f.svg
deleted file mode 100644
index 2920ea0aae3..00000000000
--- a/resources/icons/lock_closed_f.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
diff --git a/resources/icons/lock_open_f.svg b/resources/icons/lock_open_f.svg
deleted file mode 100644
index 9440d9266dd..00000000000
--- a/resources/icons/lock_open_f.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/resources/icons/mirroring_off.svg b/resources/icons/mirroring_off.svg
index 4ed9da74829..b68748e90ae 100644
--- a/resources/icons/mirroring_off.svg
+++ b/resources/icons/mirroring_off.svg
@@ -4,19 +4,19 @@
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
-
+
-
+
-
+
-
-
+
+
diff --git a/resources/icons/mirroring_on.svg b/resources/icons/mirroring_on.svg
index 8481246a3c8..55ea49516ca 100644
--- a/resources/icons/mirroring_on.svg
+++ b/resources/icons/mirroring_on.svg
@@ -2,21 +2,21 @@