Debian Codegraph @

cmake_modules/FindAHPXC.cmake

raw
1 # - Try to find AHPXC Universal Library
2 # Once done this will define
3 #
4 # AHPXC_FOUND - system has AHPXC
5 # AHPXC_INCLUDE_DIR - the AHPXC include directory
6 # AHPXC_LIBRARIES - Link these to use AHPXC
7
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
11 if (AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)
12
13 # in cache already
14 set(AHPXC_FOUND TRUE)
15 message(STATUS "Found libahp_xc: ${AHPXC_LIBRARIES}")
16
17 else (AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)
18
19 find_path(AHPXC_INCLUDE_DIR ahp_xc.h
20 PATH_SUFFIXES ahp
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(AHPXC_LIBRARIES NAMES ahp_xc
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31 if(AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)
32 set(AHPXC_FOUND TRUE)
33 else (AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)
34 set(AHPXC_FOUND FALSE)
35 endif(AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)
36
37
38 if (AHPXC_FOUND)
39 if (NOT AHPXC_FIND_QUIETLY)
40 message(STATUS "Found AHP XC: ${AHPXC_LIBRARIES}")
41 endif (NOT AHPXC_FIND_QUIETLY)
42 else (AHPXC_FOUND)
43 if (AHPXC_FIND_REQUIRED)
44 message(FATAL_ERROR "AHP XC not found. Please install libahp_xc http://www.indilib.org")
45 endif (AHPXC_FIND_REQUIRED)
46 endif (AHPXC_FOUND)
47
48 mark_as_advanced(AHPXC_INCLUDE_DIR AHPXC_LIBRARIES)
49
50 endif (AHPXC_INCLUDE_DIR AND AHPXC_LIBRARIES)