File: FindJSON-C.cmake

package info (click to toggle)
mobilitydb 1.3.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 119,380 kB
  • sloc: ansic: 175,127; sql: 100,930; xml: 23,111; yacc: 447; makefile: 200; lex: 151; sh: 142
file content (27 lines) | stat: -rw-r--r-- 659 bytes parent folder | download | duplicates (2)
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
# - Find json-c
# Find the PostgreSQL includes and client library
# This module defines
#  JSONC_INCLUDE_DIR
#  JSONC_LIBRARIES
#
# Copyright (c) 2021, Vicky Vergara <vicky@georepublic.org>

find_library(JSON-C_LIBRARIES
  NAMES json-c
  HINTS /lib /lib64 /usr/lib /usr/lib64
  )

find_path(JSON-C_INCLUDE_DIRS
  NAMES json.h
  HINTS /usr/include PATH_SUFFIXES json-c json
  )

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JSON-C
  FOUND_VAR JSON-C_FOUND
  REQUIRED_VARS JSON-C_INCLUDE_DIRS JSON-C_LIBRARIES
  FAIL_MESSAGE "Could NOT find json-c")

if(JSON-C_FOUND)
  mark_as_advanced(JSON-C_INCLUDE_DIRS JSON-C_LIBRARIES)
endif()