-
Notifications
You must be signed in to change notification settings - Fork 62
/
FindCGNS.cmake
43 lines (32 loc) · 950 Bytes
/
FindCGNS.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# Find the native CGNS includes and library
#
# CGNS_INCLUDE_DIR - where to find cgns.h, etc.
# CGNS_LIBRARIES - List of fully qualified libraries to link against when using CGNS.
# CGNS_FOUND - Do not attempt to use CGNS if "no" or undefined.
find_path(CGNS_INCLUDE_DIR cgnslib.h
/usr/local/include
/usr/include
)
find_library(CGNS_LIBRARY cgns
/usr/local/lib
/usr/lib
)
set(CGNS_FOUND "NO")
if(CGNS_INCLUDE_DIR)
if(CGNS_LIBRARY)
set( CGNS_LIBRARIES ${CGNS_LIBRARY} )
set( CGNS_FOUND "YES" )
endif()
endif()
if(CGNS_FIND_REQUIRED AND NOT CGNS_FOUND)
message(SEND_ERROR "Unable to find the requested CGNS libraries.")
endif()
# handle the QUIETLY and REQUIRED arguments and set CGNS_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CGNS DEFAULT_MSG CGNS_LIBRARY CGNS_INCLUDE_DIR)
mark_as_advanced(
CGNS_INCLUDE_DIR
CGNS_LIBRARY
)