diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index 12e61d7f3..ae9087ed4 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -308,5 +308,6 @@ if(SLIC3R_PROFILE) endif() if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY) - add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE) + #add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE) + target_precompile_headers(libslic3r PRIVATE pchheader.hpp) endif () diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index ac6961990..a110a82ed 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -231,5 +231,6 @@ if (SLIC3R_STATIC AND UNIX AND NOT APPLE) endif () if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY) - add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE) + #add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE) + target_precompile_headers(libslic3r_gui PRIVATE pchheader.hpp) endif ()