Skip to content

Commit

Permalink
Fix CGAL support for CGAL version 6+ (#56)
Browse files Browse the repository at this point in the history
CGAL defines proper CMake targets since v5, and the previous way of including CGAL from CMake was removed with v6.
  • Loading branch information
niklas-uhl authored Jan 10, 2025
1 parent a084ae8 commit 49dea30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,12 @@ if (KAGEN_USE_CGAL)
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "Force CGAL to maintain CMAKE flags")
find_package(CGAL QUIET)
if (CGAL_FOUND)
add_definitions(-DKAGEN_CGAL_FOUND)
add_definitions(-DKAGEN_CGAL_FOUND)
if (${CGAL_VERSION} VERSION_GREATER_EQUAL 5)
list(APPEND KAGEN_LINK_LIBRARIES CGAL::CGAL)
else()
include(${CGAL_USE_FILE})
endif()
else ()
message(STATUS "Could not find the CGAL library: Random Delaunay Graphs will not be available")
endif ()
Expand Down

0 comments on commit 49dea30

Please sign in to comment.