Skip to content

Commit

Permalink
Merge pull request #4131 from rcolyer/CGAL5Compat
Browse files Browse the repository at this point in the history
Switch to an afterwards check for CGAL version.
  • Loading branch information
t-paul committed Feb 19, 2022
2 parents 755ffce + 4b85993 commit d9b0072
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -303,7 +303,11 @@ endif()
# Reconsider this after CGAL 5.4: https://github.com/CGAL/cgal/pull/6029
set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE TRUE)
find_package(CGAL 5.0 REQUIRED COMPONENTS Core)
# Some older versions do not match with CGAL 5.0 REQUIRED, so we check after.
find_package(CGAL REQUIRED COMPONENTS Core)
if (${CGAL_MAJOR_VERSION} LESS 5)
message(FATAL_ERROR "CGAL: ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} less than required minimum version 5.0")
endif()
message(STATUS "CGAL: ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
target_compile_definitions(OpenSCAD PRIVATE ENABLE_CGAL)
# The macro `CGAL_DEBUG` allows to force CGAL assertions, even if `NDEBUG` is defined,
Expand Down

0 comments on commit d9b0072

Please sign in to comment.