v0.16.3
Loading...
Searching...
No Matches
FindCGAL.cmake
Go to the documentation of this file.
1# CGAL is optional. CGAL_DIR points to the package's CGALConfig.cmake directory.
2if(NOT CGAL_DIR AND DEFINED ENV{CGAL_DIR})
3 set(CGAL_DIR "$ENV{CGAL_DIR}" CACHE PATH "Directory containing CGALConfig.cmake")
4endif()
5
6set(CGAL_FOUND FALSE)
7if(CGAL_DIR)
8 # CGAL also finds Boost; keep its variables separate from MoFEM's components.
9 function(mofem_find_cgal)
10 find_package(CGAL 6.2 REQUIRED CONFIG PATHS "${CGAL_DIR}" NO_DEFAULT_PATH)
11 set(CGAL_FOUND "${CGAL_FOUND}" PARENT_SCOPE)
12 set(CGAL_VERSION "${CGAL_VERSION}" PARENT_SCOPE)
13 endfunction()
14 mofem_find_cgal()
15 add_definitions(-DWITH_CGAL)
16 message(STATUS "MoFEM with CGAL ${CGAL_VERSION}: ${CGAL_DIR}")
17endif()