root/sandbox/sigis/christian.gonzalez/trunk/cmake/FindCGAL.cmake

Revision 86, 1.2 KB (checked in by takubo, 3 years ago)

CMake files improvement

Line 
1# - Find CGAL
2# Find the CGAL includes and client library
3# This module defines
4#  CGAL_INCLUDE_DIR, where to find CGAL.h
5#  CGAL_LIBRARIES, the libraries needed to use CGAL.
6#  CGAL_FOUND, If false, do not try to use CGAL.
7
8if(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
9   set(CGAL_FOUND TRUE)
10
11else(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
12
13 FIND_PATH(CGAL_INCLUDE_DIR CGAL/basic.h
14      /usr/include
15      /usr/local/include
16      $ENV{ProgramFiles}/CGAL/*/include
17      $ENV{SystemDrive}/CGAL/*/include
18      )
19
20  find_library(CGAL_LIBRARIES NAMES CGAL libCGAL
21     PATHS
22     /usr/lib
23     /usr/local/lib
24     /usr/lib/CGAL
25     /usr/lib64
26     /usr/local/lib64
27     /usr/lib64/CGAL
28     $ENV{ProgramFiles}/CGAL/*/lib
29     $ENV{SystemDrive}/CGAL/*/lib
30     )
31     
32  if(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
33    set(CGAL_FOUND TRUE)
34    message(STATUS "Found CGAL: ${CGAL_INCLUDE_DIR}, ${CGAL_LIBRARIES}")
35    INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIR} $ENV{CGAL_CFG})
36  else(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
37    set(CGAL_FOUND FALSE)
38    message(STATUS "CGAL not found.")
39  endif(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
40
41  mark_as_advanced(CGAL_INCLUDE_DIR CGAL_LIBRARIES)
42
43endif(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES)
Note: See TracBrowser for help on using the browser.