Skip to content

Commit

Permalink
editing changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoeurjo committed Oct 1, 2024
1 parent 93045a6 commit 16bdcf9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions cmake/CheckDGtalOptionalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -343,21 +343,25 @@ if(WITH_CGAL)
endif()

find_package(CGAL COMPONENTS Core)
if(CGAL_FOUND)
if(CGAL_FOUND)
set(CGAL_FOUND_DGTAL 1)
target_compile_definitions(DGtal PUBLIC -DCGAL_EIGEN3_ENABLED)
target_compile_definitions(DGtal PUBLIC -DWITH_CGAL)
target_compile_definitions(DGtal PUBLIC -DWITH_Eigen3 -DWITH_LAPACK)
message(STATUS "CGAL found, version ${CGAL_VERSION}")
if (CGAL_VERSION VERSION_LESS "6.0")
if (CGAL_VERSION VERSION_LESS "5.0")
message(FATAL_ERROR "CGAL version 5.0 or higher is required.")
include( ${CGAL_USE_FILE} )
target_link_libraries(DGtal PUBLIC ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
## Making sure that CGAL got the Eigen3 flag
else()
target_link_libraries(DGtal PUBLIC CGAL::CGAL)
set(DGtalLibDependencies ${DGtalLibDependencies} CGAL::CGAL)
if (CGAL_VERSION VERSION_LESS "6.0")
message(STATUS "CGAL using ${CGAL_USE_FILE}")
include( ${CGAL_USE_FILE} )
target_link_libraries(DGtal PUBLIC ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
## Making sure that CGAL got the Eigen3 flag
else()
target_link_libraries(DGtal PUBLIC CGAL::CGAL)
set(DGtalLibDependencies ${DGtalLibDependencies} CGAL::CGAL)
endif()
endif()
endif()
endif()
Expand Down

0 comments on commit 16bdcf9

Please sign in to comment.