Debian Codegraph @

cmake/modules/FindGeas.cmake

raw
1 # - Try to find Geas
2 # Once done this will define
3 # GEAS_FOUND - System has Geas
4 # GEAS_INCLUDE_DIRS - The Geas include directories
5 # GEAS_LIBRARIES - The libraries needed to use Geas
6 # User can set Geas_ROOT to the preferred installation prefix
7 # Imported target Geas will be created for linking purposes
8 find_path(
9 GEAS_INCLUDE geas/c/geas.h
10 PATH_SUFFIXES include
11 )
12
13 find_library(
14 GEAS_LIBRARY NAMES geas libgeas
15 PATH_SUFFIXES lib
16 )
17
18 include(FindPackageHandleStandardArgs)
19 # handle the QUIETLY and REQUIRED arguments and set GEAS_FOUND to TRUE
20 # if all listed variables are TRUE
21 find_package_handle_standard_args(Geas
22 FOUND_VAR GEAS_FOUND
23 REQUIRED_VARS GEAS_INCLUDE GEAS_LIBRARY
24 FAIL_MESSAGE "Could NOT find Geas, use Geas_ROOT to hint its location"
25 )
26
27 mark_as_advanced(GEAS_INCLUDE GEAS_LIBRARY)
28
29 if(GEAS_FOUND)
30 add_library(Geas UNKNOWN IMPORTED)
31 set_target_properties(Geas PROPERTIES
32 IMPORTED_LOCATION ${GEAS_LIBRARY}
33 INTERFACE_INCLUDE_DIRECTORIES ${GEAS_INCLUDE}
34 )
35 endif()
36
37 set(GEAS_LIBRARIES ${GEAS_LIBRARY})
38 set(GEAS_INCLUDE_DIRS ${GEAS_INCLUDE})