From 6945366299c1f3091bc0e3394a8605c7e89c2c93 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 2 May 2022 14:44:17 +0300 Subject: [PATCH] Trying to fix FindCGAL. --- cmake/modules/FindCGAL.cmake | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cmake/modules/FindCGAL.cmake b/cmake/modules/FindCGAL.cmake index abc1dc244a..8262f941a7 100644 --- a/cmake/modules/FindCGAL.cmake +++ b/cmake/modules/FindCGAL.cmake @@ -33,14 +33,26 @@ IF(DEAL_II_HAVE_CXX17) LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) FIND_PACKAGE(CGAL) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) + IF(CGAL_HEADER_ONLY) + SET(CGAL_LIBS "-NOTFOUND") + ELSE(CGAL_HEADER_ONLY) + SET(CGAL_LIBS "${CGAL_CONFIGURED_LIBRARIES}") + ENDIF(CGAL_HEADER_ONLY) ELSE(DEAL_II_HAVE_CXX17) SET(CGAL_FOUND FALSE) SET(CGAL_INCLUDE_DIRS "-NOTFOUND") + SET(CGAL_LIBS "-NOTFOUND") MESSAGE(STATUS "CGAL wrappers require C++17. Disabling CGAL Support.") ENDIF(DEAL_II_HAVE_CXX17) DEAL_II_PACKAGE_HANDLE(CGAL - INCLUDE_DIRS REQUIRED CGAL_INCLUDE_DIRS - USER_INCLUDE_DIRS REQUIRED CGAL_INCLUDE_DIRS - CLEAR CGAL_INCLUDE_DIRS + INCLUDE_DIRS + REQUIRED CGAL_INCLUDE_DIRS + LIBRARIES + OPTIONAL CGAL_LIBS + USER_INCLUDE_DIRS + REQUIRED CGAL_INCLUDE_DIRS + CLEAR + CGAL_INCLUDE_DIRS + CGAL_LIBS ) -- 2.39.5