diff --git a/CMakeLists.txt b/CMakeLists.txt index f4d1223fd..22dfcaf0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,8 @@ if (MSVC) add_compile_options(/MP) endif () # /bigobj (Increase Number of Sections in .Obj file) - add_compile_options(-bigobj) + # error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm90' or greater + add_compile_options(-bigobj -Zm316) endif () # CMAKE_PREFIX_PATH is used to point CMake to the remaining dependencies (Boost, TBB, ...) diff --git a/cmake/modules/PrecompiledHeader.cmake b/cmake/modules/PrecompiledHeader.cmake new file mode 100644 index 000000000..1e578d261 --- /dev/null +++ b/cmake/modules/PrecompiledHeader.cmake @@ -0,0 +1,214 @@ +# Function for setting up precompiled headers. Usage: +# +# add_library/executable(target +# pchheader.c pchheader.cpp pchheader.h) +# +# add_precompiled_header(target pchheader.h +# [FORCEINCLUDE] +# [SOURCE_C pchheader.c] +# [SOURCE_CXX pchheader.cpp]) +# +# Options: +# +# FORCEINCLUDE: Add compiler flags to automatically include the +# pchheader.h from every source file. Works with both GCC and +# MSVC. This is recommended. +# +# SOURCE_C/CXX: Specifies the .c/.cpp source file that includes +# pchheader.h for generating the pre-compiled header +# output. Defaults to pchheader.c. Only required for MSVC. +# +# Caveats: +# +# * Its not currently possible to use the same precompiled-header in +# more than a single target in the same directory (No way to set +# the source file properties differently for each target). +# +# * MSVC: A source file with the same name as the header must exist +# and be included in the target (E.g. header.cpp). Name of file +# can be changed using the SOURCE_CXX/SOURCE_C options. +# +# License: +# +# Copyright (C) 2009-2017 Lars Christensen +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the 'Software') deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include(CMakeParseArguments) + +macro(combine_arguments _variable) + set(_result "") + foreach(_element ${${_variable}}) + set(_result "${_result} \"${_element}\"") + endforeach() + string(STRIP "${_result}" _result) + set(${_variable} "${_result}") +endmacro() + +function(export_all_flags _filename) + set(_include_directories "$") + set(_compile_definitions "$") + set(_compile_flags "$") + set(_compile_options "$") + set(_include_directories "$<$:-I$\n>") + set(_compile_definitions "$<$:-D$\n>") + set(_compile_flags "$<$:$\n>") + set(_compile_options "$<$:$\n>") + file(GENERATE OUTPUT "${_filename}" CONTENT "${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}\n") +endfunction() + +function(add_precompiled_header _target _input) + cmake_parse_arguments(_PCH "FORCEINCLUDE" "SOURCE_CXX;SOURCE_C" "" ${ARGN}) + + get_filename_component(_input_we ${_input} NAME_WE) + if(NOT _PCH_SOURCE_CXX) + set(_PCH_SOURCE_CXX "${_input_we}.cpp") + endif() + if(NOT _PCH_SOURCE_C) + set(_PCH_SOURCE_C "${_input_we}.c") + endif() + + if(MSVC) + set(_pch_cxx_pch "${CMAKE_CFG_INTDIR}/cxx_${_input_we}.pch") + set(_pch_c_pch "${CMAKE_CFG_INTDIR}/c_${_input_we}.pch") + + get_target_property(sources ${_target} SOURCES) + foreach(_source ${sources}) + set(_pch_compile_flags "") + if(_source MATCHES \\.\(cc|cxx|cpp|c\)$) + if(_source MATCHES \\.\(cpp|cxx|cc\)$) + set(_pch_header "${_input}") + set(_pch "${_pch_cxx_pch}") + else() + set(_pch_header "${_input}") + set(_pch "${_pch_c_pch}") + endif() + + if(_source STREQUAL "${_PCH_SOURCE_CXX}") + set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_cxx_pch}\" \"/Yc${_input}\"") + set(_pch_source_cxx_found TRUE) + set_source_files_properties("${_source}" PROPERTIES OBJECT_OUTPUTS "${_pch_cxx_pch}") + elseif(_source STREQUAL "${_PCH_SOURCE_C}") + set(_pch_compile_flags "${_pch_compile_flags} \"/Fp${_pch_c_pch}\" \"/Yc${_input}\"") + set(_pch_source_c_found TRUE) + 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}\"") + 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}\"") + 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}") + endif(_PCH_FORCEINCLUDE) + endif() + + get_source_file_property(_object_depends "${_source}" OBJECT_DEPENDS) + if(NOT _object_depends) + set(_object_depends) + endif() + if(_PCH_FORCEINCLUDE) + list(APPEND _object_depends "${CMAKE_CURRENT_SOURCE_DIR}/${_pch_header}") + endif() + + set_source_files_properties(${_source} PROPERTIES + COMPILE_FLAGS "${_pch_compile_flags}" + OBJECT_DEPENDS "${_object_depends}") + endif() + endforeach() + + if(_pch_source_cxx_needed AND NOT _pch_source_cxx_found) + message(FATAL_ERROR "A source file ${_PCH_SOURCE_CXX} for ${_input} is required for MSVC builds. Can be set with the SOURCE_CXX option.") + endif() + if(_pch_source_c_needed AND NOT _pch_source_c_found) + message(FATAL_ERROR "A source file ${_PCH_SOURCE_C} for ${_input} is required for MSVC builds. Can be set with the SOURCE_C option.") + endif() + endif(MSVC) + + if(CMAKE_COMPILER_IS_GNUCXX) + get_filename_component(_name ${_input} NAME) + set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}") + set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch") + set(_pchfile "${_pch_binary_dir}/${_input}") + set(_outdir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch/${_name}.gch") + file(MAKE_DIRECTORY "${_outdir}") + set(_output_cxx "${_outdir}/.c++") + set(_output_c "${_outdir}/.c") + + set(_pch_flags_file "${_pch_binary_dir}/compile_flags.rsp") + export_all_flags("${_pch_flags_file}") + set(_compiler_FLAGS "@${_pch_flags_file}") + add_custom_command( + OUTPUT "${_pchfile}" + COMMAND "${CMAKE_COMMAND}" -E copy "${_pch_header}" "${_pchfile}" + DEPENDS "${_pch_header}" + COMMENT "Updating ${_name}") + add_custom_command( + OUTPUT "${_output_cxx}" + COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" "${_pchfile}" + DEPENDS "${_pchfile}" "${_pch_flags_file}" + COMMENT "Precompiling ${_name} for ${_target} (C++)") + add_custom_command( + OUTPUT "${_output_c}" + COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" "${_pchfile}" + DEPENDS "${_pchfile}" "${_pch_flags_file}" + COMMENT "Precompiling ${_name} for ${_target} (C)") + + get_property(_sources TARGET ${_target} PROPERTY SOURCES) + foreach(_source ${_sources}) + set(_pch_compile_flags "") + + if(_source MATCHES \\.\(cc|cxx|cpp|c\)$) + get_source_file_property(_pch_compile_flags "${_source}" COMPILE_FLAGS) + if(NOT _pch_compile_flags) + set(_pch_compile_flags) + endif() + separate_arguments(_pch_compile_flags) + list(APPEND _pch_compile_flags -Winvalid-pch) + if(_PCH_FORCEINCLUDE) + list(APPEND _pch_compile_flags -include "${_pchfile}") + else(_PCH_FORCEINCLUDE) + list(APPEND _pch_compile_flags "-I${_pch_binary_dir}") + endif(_PCH_FORCEINCLUDE) + + get_source_file_property(_object_depends "${_source}" OBJECT_DEPENDS) + if(NOT _object_depends) + set(_object_depends) + endif() + list(APPEND _object_depends "${_pchfile}") + if(_source MATCHES \\.\(cc|cxx|cpp\)$) + list(APPEND _object_depends "${_output_cxx}") + else() + list(APPEND _object_depends "${_output_c}") + endif() + + combine_arguments(_pch_compile_flags) + set_source_files_properties(${_source} PROPERTIES + COMPILE_FLAGS "${_pch_compile_flags}" + OBJECT_DEPENDS "${_object_depends}") + endif() + endforeach() + endif(CMAKE_COMPILER_IS_GNUCXX) +endfunction() diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index 7e41a158a..c9953e38a 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -1,9 +1,13 @@ project(libslic3r) cmake_minimum_required(VERSION 2.6) +include(PrecompiledHeader) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libslic3r_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h @ONLY) add_library(libslic3r STATIC + pchheader.cpp + pchheader.hpp BoundingBox.cpp BoundingBox.hpp BridgeDetector.cpp @@ -151,6 +155,8 @@ add_library(libslic3r STATIC Utils.hpp ) +add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE) + target_compile_definitions(libslic3r PUBLIC -DUSE_TBB ${PNG_DEFINITIONS}) target_include_directories(libslic3r PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${LIBNEST2D_INCLUDES} ${PNG_INCLUDE_DIRS}) target_link_libraries(libslic3r diff --git a/src/libslic3r/pchheader.cpp b/src/libslic3r/pchheader.cpp new file mode 100644 index 000000000..9ab59c53d --- /dev/null +++ b/src/libslic3r/pchheader.cpp @@ -0,0 +1 @@ +#include "pchheader.hpp" diff --git a/src/libslic3r/pchheader.hpp b/src/libslic3r/pchheader.hpp new file mode 100644 index 000000000..b27dfe6a2 --- /dev/null +++ b/src/libslic3r/pchheader.hpp @@ -0,0 +1,122 @@ +#ifdef WIN32 + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #ifndef NOMINMAX + #define NOMINMAX + #endif +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "BoundingBox.hpp" +#include "ClipperUtils.hpp" +#include "Config.hpp" +#include "I18N.hpp" +#include "MultiPoint.hpp" +#include "Point.hpp" +#include "Polygon.hpp" +#include "Polyline.hpp" +#include "SVG.hpp" + +#include "libslic3r.h" +#include "libslic3r_version.h" + +#include "clipper.hpp" + +#include + +#include diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 7837ae2b3..509e0b665 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -1,122 +1,130 @@ +project(libslic3r_gui) +cmake_minimum_required(VERSION 2.6) + +include(PrecompiledHeader) + add_library(libslic3r_gui STATIC - ${LIBDIR}/slic3r/GUI/AboutDialog.cpp - ${LIBDIR}/slic3r/GUI/AboutDialog.hpp - ${LIBDIR}/slic3r/GUI/SysInfoDialog.cpp - ${LIBDIR}/slic3r/GUI/SysInfoDialog.hpp - ${LIBDIR}/slic3r/GUI/AppConfig.cpp - ${LIBDIR}/slic3r/GUI/AppConfig.hpp - ${LIBDIR}/slic3r/GUI/BackgroundSlicingProcess.cpp - ${LIBDIR}/slic3r/GUI/BackgroundSlicingProcess.hpp - ${LIBDIR}/slic3r/GUI/BitmapCache.cpp - ${LIBDIR}/slic3r/GUI/BitmapCache.hpp - ${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.cpp - ${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.hpp - ${LIBDIR}/slic3r/GUI/3DScene.cpp - ${LIBDIR}/slic3r/GUI/3DScene.hpp - ${LIBDIR}/slic3r/GUI/GLShader.cpp - ${LIBDIR}/slic3r/GUI/GLShader.hpp - ${LIBDIR}/slic3r/GUI/GLCanvas3D.hpp - ${LIBDIR}/slic3r/GUI/GLCanvas3D.cpp - ${LIBDIR}/slic3r/GUI/GLCanvas3DManager.hpp - ${LIBDIR}/slic3r/GUI/GLCanvas3DManager.cpp - ${LIBDIR}/slic3r/GUI/GLGizmo.hpp - ${LIBDIR}/slic3r/GUI/GLGizmo.cpp - ${LIBDIR}/slic3r/GUI/GLTexture.hpp - ${LIBDIR}/slic3r/GUI/GLTexture.cpp - ${LIBDIR}/slic3r/GUI/GLToolbar.hpp - ${LIBDIR}/slic3r/GUI/GLToolbar.cpp - ${LIBDIR}/slic3r/GUI/Preferences.cpp - ${LIBDIR}/slic3r/GUI/Preferences.hpp - ${LIBDIR}/slic3r/GUI/Preset.cpp - ${LIBDIR}/slic3r/GUI/Preset.hpp - ${LIBDIR}/slic3r/GUI/PresetBundle.cpp - ${LIBDIR}/slic3r/GUI/PresetBundle.hpp - ${LIBDIR}/slic3r/GUI/PresetHints.cpp - ${LIBDIR}/slic3r/GUI/PresetHints.hpp - ${LIBDIR}/slic3r/GUI/GUI.cpp - ${LIBDIR}/slic3r/GUI/GUI.hpp - ${LIBDIR}/slic3r/GUI/GUI_Preview.cpp - ${LIBDIR}/slic3r/GUI/GUI_Preview.hpp - ${LIBDIR}/slic3r/GUI/GUI_PreviewIface.cpp - ${LIBDIR}/slic3r/GUI/GUI_PreviewIface.hpp - ${LIBDIR}/slic3r/GUI/GUI_App.cpp - ${LIBDIR}/slic3r/GUI/GUI_App.hpp - ${LIBDIR}/slic3r/GUI/GUI_Utils.cpp - ${LIBDIR}/slic3r/GUI/GUI_Utils.hpp - ${LIBDIR}/slic3r/GUI/MainFrame.cpp - ${LIBDIR}/slic3r/GUI/MainFrame.hpp - ${LIBDIR}/slic3r/GUI/Plater.cpp - ${LIBDIR}/slic3r/GUI/Plater.hpp - ${LIBDIR}/slic3r/GUI/GUI_ObjectList.cpp - ${LIBDIR}/slic3r/GUI/GUI_ObjectList.hpp - ${LIBDIR}/slic3r/GUI/GUI_ObjectManipulation.cpp - ${LIBDIR}/slic3r/GUI/GUI_ObjectManipulation.hpp - ${LIBDIR}/slic3r/GUI/LambdaObjectDialog.cpp - ${LIBDIR}/slic3r/GUI/LambdaObjectDialog.hpp - ${LIBDIR}/slic3r/GUI/Tab.cpp - ${LIBDIR}/slic3r/GUI/Tab.hpp - ${LIBDIR}/slic3r/GUI/TabIface.cpp - ${LIBDIR}/slic3r/GUI/TabIface.hpp - ${LIBDIR}/slic3r/GUI/Field.cpp - ${LIBDIR}/slic3r/GUI/Field.hpp - ${LIBDIR}/slic3r/GUI/OptionsGroup.cpp - ${LIBDIR}/slic3r/GUI/OptionsGroup.hpp - ${LIBDIR}/slic3r/GUI/BedShapeDialog.cpp - ${LIBDIR}/slic3r/GUI/BedShapeDialog.hpp - ${LIBDIR}/slic3r/GUI/2DBed.cpp - ${LIBDIR}/slic3r/GUI/2DBed.hpp - ${LIBDIR}/slic3r/GUI/wxExtensions.cpp - ${LIBDIR}/slic3r/GUI/wxExtensions.hpp - ${LIBDIR}/slic3r/GUI/WipeTowerDialog.cpp - ${LIBDIR}/slic3r/GUI/WipeTowerDialog.hpp - ${LIBDIR}/slic3r/GUI/RammingChart.cpp - ${LIBDIR}/slic3r/GUI/RammingChart.hpp - ${LIBDIR}/slic3r/GUI/BonjourDialog.cpp - ${LIBDIR}/slic3r/GUI/BonjourDialog.hpp - ${LIBDIR}/slic3r/GUI/ButtonsDescription.cpp - ${LIBDIR}/slic3r/GUI/ButtonsDescription.hpp - ${LIBDIR}/slic3r/Config/Snapshot.cpp - ${LIBDIR}/slic3r/Config/Snapshot.hpp - ${LIBDIR}/slic3r/Config/Version.cpp - ${LIBDIR}/slic3r/Config/Version.hpp - ${LIBDIR}/slic3r/Utils/ASCIIFolding.cpp - ${LIBDIR}/slic3r/Utils/ASCIIFolding.hpp - ${LIBDIR}/slic3r/Utils/Serial.cpp - ${LIBDIR}/slic3r/Utils/Serial.hpp - ${LIBDIR}/slic3r/GUI/ConfigWizard.cpp - ${LIBDIR}/slic3r/GUI/ConfigWizard.hpp - ${LIBDIR}/slic3r/GUI/MsgDialog.cpp - ${LIBDIR}/slic3r/GUI/MsgDialog.hpp - ${LIBDIR}/slic3r/GUI/UpdateDialogs.cpp - ${LIBDIR}/slic3r/GUI/UpdateDialogs.hpp - ${LIBDIR}/slic3r/GUI/FirmwareDialog.cpp - ${LIBDIR}/slic3r/GUI/FirmwareDialog.hpp - ${LIBDIR}/slic3r/GUI/ProgressIndicator.hpp - ${LIBDIR}/slic3r/GUI/ProgressStatusBar.hpp - ${LIBDIR}/slic3r/GUI/ProgressStatusBar.cpp - ${LIBDIR}/slic3r/Utils/Http.cpp - ${LIBDIR}/slic3r/Utils/Http.hpp - ${LIBDIR}/slic3r/Utils/FixModelByWin10.cpp - ${LIBDIR}/slic3r/Utils/FixModelByWin10.hpp - ${LIBDIR}/slic3r/Utils/PrintHostSendDialog.cpp - ${LIBDIR}/slic3r/Utils/PrintHostSendDialog.hpp - ${LIBDIR}/slic3r/Utils/OctoPrint.cpp - ${LIBDIR}/slic3r/Utils/OctoPrint.hpp - ${LIBDIR}/slic3r/Utils/Duet.cpp - ${LIBDIR}/slic3r/Utils/Duet.hpp - ${LIBDIR}/slic3r/Utils/PrintHost.cpp - ${LIBDIR}/slic3r/Utils/PrintHost.hpp - ${LIBDIR}/slic3r/Utils/Bonjour.cpp - ${LIBDIR}/slic3r/Utils/Bonjour.hpp - ${LIBDIR}/slic3r/Utils/PresetUpdater.cpp - ${LIBDIR}/slic3r/Utils/PresetUpdater.hpp - ${LIBDIR}/slic3r/Utils/Time.cpp - ${LIBDIR}/slic3r/Utils/Time.hpp - ${LIBDIR}/slic3r/Utils/HexFile.cpp - ${LIBDIR}/slic3r/Utils/HexFile.hpp - ${LIBDIR}/slic3r/AppController.hpp - ${LIBDIR}/slic3r/AppController.cpp - ${LIBDIR}/slic3r/AppControllerWx.cpp + pchheader.cpp + pchheader.hpp + GUI/AboutDialog.cpp + GUI/AboutDialog.hpp + GUI/SysInfoDialog.cpp + GUI/SysInfoDialog.hpp + GUI/AppConfig.cpp + GUI/AppConfig.hpp + GUI/BackgroundSlicingProcess.cpp + GUI/BackgroundSlicingProcess.hpp + GUI/BitmapCache.cpp + GUI/BitmapCache.hpp + GUI/ConfigSnapshotDialog.cpp + GUI/ConfigSnapshotDialog.hpp + GUI/3DScene.cpp + GUI/3DScene.hpp + GUI/GLShader.cpp + GUI/GLShader.hpp + GUI/GLCanvas3D.hpp + GUI/GLCanvas3D.cpp + GUI/GLCanvas3DManager.hpp + GUI/GLCanvas3DManager.cpp + GUI/GLGizmo.hpp + GUI/GLGizmo.cpp + GUI/GLTexture.hpp + GUI/GLTexture.cpp + GUI/GLToolbar.hpp + GUI/GLToolbar.cpp + GUI/Preferences.cpp + GUI/Preferences.hpp + GUI/Preset.cpp + GUI/Preset.hpp + GUI/PresetBundle.cpp + GUI/PresetBundle.hpp + GUI/PresetHints.cpp + GUI/PresetHints.hpp + GUI/GUI.cpp + GUI/GUI.hpp + GUI/GUI_Preview.cpp + GUI/GUI_Preview.hpp + GUI/GUI_PreviewIface.cpp + GUI/GUI_PreviewIface.hpp + GUI/GUI_App.cpp + GUI/GUI_App.hpp + GUI/GUI_Utils.cpp + GUI/GUI_Utils.hpp + GUI/MainFrame.cpp + GUI/MainFrame.hpp + GUI/Plater.cpp + GUI/Plater.hpp + GUI/GUI_ObjectList.cpp + GUI/GUI_ObjectList.hpp + GUI/GUI_ObjectManipulation.cpp + GUI/GUI_ObjectManipulation.hpp + GUI/LambdaObjectDialog.cpp + GUI/LambdaObjectDialog.hpp + GUI/Tab.cpp + GUI/Tab.hpp + GUI/TabIface.cpp + GUI/TabIface.hpp + GUI/Field.cpp + GUI/Field.hpp + GUI/OptionsGroup.cpp + GUI/OptionsGroup.hpp + GUI/BedShapeDialog.cpp + GUI/BedShapeDialog.hpp + GUI/2DBed.cpp + GUI/2DBed.hpp + GUI/wxExtensions.cpp + GUI/wxExtensions.hpp + GUI/WipeTowerDialog.cpp + GUI/WipeTowerDialog.hpp + GUI/RammingChart.cpp + GUI/RammingChart.hpp + GUI/BonjourDialog.cpp + GUI/BonjourDialog.hpp + GUI/ButtonsDescription.cpp + GUI/ButtonsDescription.hpp + Config/Snapshot.cpp + Config/Snapshot.hpp + Config/Version.cpp + Config/Version.hpp + Utils/ASCIIFolding.cpp + Utils/ASCIIFolding.hpp + Utils/Serial.cpp + Utils/Serial.hpp + GUI/ConfigWizard.cpp + GUI/ConfigWizard.hpp + GUI/MsgDialog.cpp + GUI/MsgDialog.hpp + GUI/UpdateDialogs.cpp + GUI/UpdateDialogs.hpp + GUI/FirmwareDialog.cpp + GUI/FirmwareDialog.hpp + GUI/ProgressIndicator.hpp + GUI/ProgressStatusBar.hpp + GUI/ProgressStatusBar.cpp + Utils/Http.cpp + Utils/Http.hpp + Utils/FixModelByWin10.cpp + Utils/FixModelByWin10.hpp + Utils/PrintHostSendDialog.cpp + Utils/PrintHostSendDialog.hpp + Utils/OctoPrint.cpp + Utils/OctoPrint.hpp + Utils/Duet.cpp + Utils/Duet.hpp + Utils/PrintHost.cpp + Utils/PrintHost.hpp + Utils/Bonjour.cpp + Utils/Bonjour.hpp + Utils/PresetUpdater.cpp + Utils/PresetUpdater.hpp + Utils/Time.cpp + Utils/Time.hpp + Utils/HexFile.cpp + Utils/HexFile.hpp + AppController.hpp + AppController.cpp + AppControllerWx.cpp ) target_link_libraries(libslic3r_gui libslic3r avrdude) +add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE) diff --git a/src/slic3r/pchheader.cpp b/src/slic3r/pchheader.cpp new file mode 100644 index 000000000..9ab59c53d --- /dev/null +++ b/src/slic3r/pchheader.cpp @@ -0,0 +1 @@ +#include "pchheader.hpp" diff --git a/src/slic3r/pchheader.hpp b/src/slic3r/pchheader.hpp new file mode 100644 index 000000000..e0a1802d5 --- /dev/null +++ b/src/slic3r/pchheader.hpp @@ -0,0 +1,180 @@ +#ifdef WIN32 + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// #include +// #include +// #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "libslic3r/Config.hpp" +#include "libslic3r/PrintConfig.hpp" +#include "libslic3r/TriangleMesh.hpp" +#include "libslic3r/Point.hpp" +#include "libslic3r/MultiPoint.hpp" +#include "libslic3r/Polygon.hpp" +#include "libslic3r/Polyline.hpp" +#include "libslic3r/BoundingBox.hpp" +#include "libslic3r/ClipperUtils.hpp" +#include "libslic3r/libslic3r.h"