File: FindCheck.cmake

package info (click to toggle)
pgagroal 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,384 kB
  • sloc: ansic: 39,090; sh: 684; python: 272; makefile: 36; sql: 13
file content (29 lines) | stat: -rw-r--r-- 575 bytes parent folder | download
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
#
# check support
#

find_package(PkgConfig)
pkg_check_modules(PC_CHECK check)

find_path(CHECK_INCLUDE_DIR
  NAMES check.h
  PATHS ${PC_CHECK_INCLUDE_DIRS}
  PATH_SUFFIXES check
)

find_library(CHECK_LIBRARY
  NAMES check
  PATHS ${PC_CHECK_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Check DEFAULT_MSG CHECK_INCLUDE_DIR CHECK_LIBRARY)

if (CHECK_FOUND)
  set(CHECK_LIBRARIES ${CHECK_LIBRARY})
  set(CHECK_INCLUDE_DIRS ${CHECK_INCLUDE_DIR})
else ()
  set(check FALSE)
endif ()

mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARY)