diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d214588..fbd597d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,6 @@ FIND_PACKAGE(Eigen3 REQUIRED) include_directories(${EIGEN3_INCLUDE_DIR}) FIND_PACKAGE(CGAL REQUIRED) -include(${CGAL_USE_FILE}) FILE(GLOB pygalmesh_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") # FILE(GLOB pygalmesh_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") @@ -13,7 +12,7 @@ FILE(GLOB pygalmesh_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") pybind11_add_module(pygalmesh ${pygalmesh_SRCS}) # ADD_LIBRARY(pygalmesh ${pygalmesh_SRCS}) -target_link_libraries(pygalmesh PRIVATE ${CGAL_LIBRARIES}) +target_link_libraries(pygalmesh PRIVATE CGAL::CGAL) # https://github.com/CGAL/cgal/issues/6002 # find_program(iwyu_path NAMES include-what-you-use iwyu REQUIRED) diff --git a/src/generate.cpp b/src/generate.cpp index 64b0ba5..baef052 100644 --- a/src/generate.cpp +++ b/src/generate.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/src/generate_from_inr.cpp b/src/generate_from_inr.cpp index 1d63fe6..a01e4c9 100644 --- a/src/generate_from_inr.cpp +++ b/src/generate_from_inr.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/src/generate_from_off.cpp b/src/generate_from_off.cpp index fcebef5..c0a1abf 100644 --- a/src/generate_from_off.cpp +++ b/src/generate_from_off.cpp @@ -18,7 +18,7 @@ #include -#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR < 3 +#if (CGAL_VERSION_MAJOR == 5 && CGAL_VERSION_MINOR < 3) #include #endif @@ -78,7 +78,7 @@ void generate_from_off( if( !input || -#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3 +#if (CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3) || (CGAL_VERSION_MAJOR >= 6) !CGAL::IO::read_OFF(input, points, polygons) || #else !CGAL::read_OFF(input, points, polygons) ||