blob: 795b61554ffac7d58550257a511407895b71fecb (
plain)
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
|
# - Try to find check
# Once done this will define
# CHECK_FOUND - System has check
# CHECK_INCLUDE_DIRS - The check include directories
# CHECK_LIBRARIES - The libraries needed to use check
# CHECK_DEFINITIONS - Compiler switches required for using check
find_package(PkgConfig)
pkg_check_modules(PC_LIBCHECK QUIET check)
set(CHECK_DEFINITIONS ${PC_LIBCHECK_CFLAGS_OTHER})
find_path(CHECK_INCLUDE_DIR check.h
HINTS ${PC_LIBCHECK_INCLUDEDIR} ${PC_LIBCHECK_INCLUDE_DIRS}
PATH_SUFFIXES check )
find_library(CHECK_LIBRARY NAMES check
HINTS ${PC_LIBCHECK_LIBDIR} ${PC_LIBCHECK_LIBRARY_DIRS} )
set(CHECK_LIBRARIES ${CHECK_LIBRARY} )
set(CHECK_INCLUDE_DIRS ${CHECK_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(check DEFAULT_MSG
CHECK_LIBRARY CHECK_INCLUDE_DIR)
mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARY )
|