cmake - move all cgal related stuff to CGAL::CGAL target

This commit is contained in:
Andrej730
2025-12-04 18:39:15 +05:00
parent db09744428
commit 0555523c98
7 changed files with 53 additions and 102 deletions
+4 -1
View File
@@ -16,13 +16,16 @@ foreach(kernel ${GEOMETRY_KERNELS})
install(TARGETS ${KERNEL_TARGET})
if(${kernel} STREQUAL "cgal")
find_package(CGAL REQUIRED)
target_link_libraries(${KERNEL_TARGET} CGAL::CGAL)
set_property(TARGET ${KERNEL_TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -DCGAL_HAS_THREADS")
set(KERNEL_TARGET_SIMPLE "${KERNEL_TARGET}_simple")
add_library(${KERNEL_TARGET_SIMPLE} OBJECT ${IFCGEOM_FILES})
set_target_properties(${KERNEL_TARGET_SIMPLE} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIFOPSH_SIMPLE_KERNEL -DCGAL_HAS_THREADS")
list(APPEND kernel_libraries ${KERNEL_TARGET_SIMPLE})
target_link_libraries(${KERNEL_TARGET_SIMPLE} ${${KERNEL_UPPER}_LIBRARIES} Eigen3::Eigen)
target_link_libraries(${KERNEL_TARGET_SIMPLE} CGAL::CGAL)
install(TARGETS ${KERNEL_TARGET_SIMPLE})
elseif(${kernel} STREQUAL "opencascade")
target_link_libraries(${KERNEL_TARGET} ${OpenCASCADE_LIBRARIES})