ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/cmake/modules/FindQHULL.cmake
Revision: 1466
Committed: Fri Jul 9 23:13:29 2010 UTC (14 years, 10 months ago) by chuckv
File size: 1237 byte(s)
Log Message:
Adding stuff for cmake

File Contents

# Content
1 # Find qhull header and library.
2 #
3
4 # This module defines the following uncached variables:
5 # QHULL_FOUND, if false, do not try to use qhull.
6 # QHULL_INCLUDE_DIRS, where to find qhull/qhull_a.h.
7 # QHULL_LIBRARIES, the libraries to link against to use the qhull library
8 # QHULL_LIBRARY_DIRS, the directory where the qhull library is found.
9
10 find_path(
11 QHULL_INCLUDE_DIR
12 qhull/qhull_a.h
13 /usr/local/include
14 /usr/include
15 /opt/local/include
16 )
17
18 if( QHULL_INCLUDE_DIR )
19 find_library(
20 QHULL_LIBRARY
21 NAMES qhull
22 PATHS /usr/local/lib /usr/lib /opt/local/lib
23 )
24 if( QHULL_LIBRARY )
25 set(QHULL_LIBRARY_DIR "")
26 get_filename_component(QHULL_LIBRARY_DIRS ${QHULL_LIBRARY} PATH)
27 # Set uncached variables as per standard.
28 set(QHULL_FOUND ON)
29 set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
30 set(QHULL_LIBRARIES ${QHULL_LIBRARY})
31 endif(QHULL_LIBRARY)
32 endif(QHULL_INCLUDE_DIR)
33
34 if(QHULL_FOUND)
35 if(NOT QHULL_FIND_QUIETLY)
36 message(STATUS "FindQHull: Found both qhull_a.h and libqhull.a")
37 endif(NOT QHULL_FIND_QUIETLY)
38 else(QHULL_FOUND)
39 if(QHULL_FIND_REQUIRED)
40 message(FATAL_ERROR "FindQHull: Could not find qhull_a.h and/or libqhull.a")
41 endif(QHULL_FIND_REQUIRED)
42 endif(QHULL_FOUND)