]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Trying to fix FindCGAL.
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 2 May 2022 11:44:17 +0000 (14:44 +0300)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 2 May 2022 11:44:17 +0000 (14:44 +0300)
cmake/modules/FindCGAL.cmake

index abc1dc244af205b703703fc7ce80c2a09312c07e..8262f941a770a95b5c437a0642e5359d831d1b3c 100644 (file)
@@ -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
   )

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.