Add MeshBoolean.cpp with CGAL as object library.
This commit is contained in:
parent
a9403319b7
commit
464ec8da6a
@ -117,8 +117,6 @@ add_library(libslic3r STATIC
|
|||||||
"${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h"
|
"${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h"
|
||||||
Line.cpp
|
Line.cpp
|
||||||
Line.hpp
|
Line.hpp
|
||||||
MeshBoolean.cpp
|
|
||||||
MeshBoolean.hpp
|
|
||||||
Model.cpp
|
Model.cpp
|
||||||
Model.hpp
|
Model.hpp
|
||||||
Arrange.hpp
|
Arrange.hpp
|
||||||
@ -220,6 +218,24 @@ add_library(libslic3r STATIC
|
|||||||
SLA/Clustering.hpp
|
SLA/Clustering.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (SLIC3R_STATIC)
|
||||||
|
set(CGAL_Boost_USE_STATIC_LIBS ON)
|
||||||
|
set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE TRUE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_package(CGAL REQUIRED)
|
||||||
|
|
||||||
|
add_library(libslic3r_cgal OBJECT MeshBoolean.cpp MeshBoolean.hpp)
|
||||||
|
target_include_directories(libslic3r_cgal PRIVATE
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
$<TARGET_PROPERTY:libigl,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
|
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
target_compile_definitions(libslic3r_cgal PRIVATE
|
||||||
|
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_COMPILE_DEFINITIONS>)
|
||||||
|
target_compile_options(libslic3r_cgal PRIVATE
|
||||||
|
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_COMPILE_OPTIONS>)
|
||||||
|
target_sources(libslic3r PRIVATE $<TARGET_OBJECTS:libslic3r_cgal>)
|
||||||
|
|
||||||
encoding_check(libslic3r)
|
encoding_check(libslic3r)
|
||||||
|
|
||||||
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB -DTBB_USE_CAPTURED_EXCEPTION=0)
|
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB -DTBB_USE_CAPTURED_EXCEPTION=0)
|
||||||
@ -240,6 +256,7 @@ target_link_libraries(libslic3r
|
|||||||
qhull
|
qhull
|
||||||
semver
|
semver
|
||||||
TBB::tbb
|
TBB::tbb
|
||||||
|
$<TARGET_PROPERTY:CGAL::CGAL,INTERFACE_LINK_LIBRARIES>
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES})
|
|||||||
|
|
||||||
encoding_check(libslic3r_gui)
|
encoding_check(libslic3r_gui)
|
||||||
|
|
||||||
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL OpenGL::GLU hidapi CGAL::CGAL)
|
target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL OpenGL::GLU hidapi)
|
||||||
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
||||||
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
|
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user