This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
FindKmsJsonRpc.cmake.in
75 lines (62 loc) · 1.76 KB
/
FindKmsJsonRpc.cmake.in
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# - Try to find KmsJsonRpc library
#=============================================================================
# Copyright 2014 Kurento
#
#=============================================================================
set(PACKAGE_VERSION "@PROJECT_VERSION@")
set(KmsJsonRpc_VERSION ${PACKAGE_VERSION})
find_package(PkgConfig)
pkg_check_modules(_JSONCPP REQUIRED kmsjsoncpp>=0.6.0)
find_path(KmsJsonRpc_INCLUDE_DIR
NAMES
jsonrpc/JsonRpcHandler.hpp
jsonrpc/JsonRpcException.hpp
jsonrpc/JsonSerializer.hpp
jsonrpc/JsonRpcUtils.hpp
jsonrpc/JsonRpcConstants.hpp
PATH_SUFFIXES
src
kurento
)
set(KmsJsonRpc_INCLUDE_DIRS ${KmsJsonRpc_INCLUDE_DIR} ${_JSONCPP_INCLUDE_DIRS}
CACHE INTERNAL "Include directories for KmsJsonRpc library"
)
set (JSON_CPP_BINARY_DIR_PREFIX "build" CACHE PATH "Path prefix used to look for binary files")
if (TARGET jsonrpc)
#Just get the target for the library
set (KmsJsonRpc_LIBRARY jsonrpc)
set (KmsJsonRpc_LIBRARIES ${KmsJsonRpc_LIBRARY} ${_JSONCPP_LIBRARIES}
CACHE INTERNAL "Libraries for KmsJsonRpc"
)
else ()
find_library (KmsJsonRpc_LIBRARY
NAMES
jsonrpc
PATH_SUFFIXES
${JSON_CPP_BINARY_DIR_PREFIX}/src
)
set (KmsJsonRpc_LIBRARIES ${KmsJsonRpc_LIBRARY} ${_JSONCPP_LIBRARIES}
CACHE INTERNAL "Libraries for KmsJsonRpc"
)
endif()
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args(KmsJsonRpc
FOUND_VAR
KmsJsonRpc_FOUND
REQUIRED_VARS
KmsJsonRpc_VERSION
KmsJsonRpc_INCLUDE_DIR
KmsJsonRpc_INCLUDE_DIRS
KmsJsonRpc_LIBRARY
KmsJsonRpc_LIBRARIES
VERSION_VAR
KmsJsonRpc_VERSION
)
mark_as_advanced(
KmsJsonRpc_FOUND
KmsJsonRpc_VERSION
KmsJsonRpc_INCLUDE_DIR
KmsJsonRpc_INCLUDE_DIRS
KmsJsonRpc_LIBRARY
KmsJsonRpc_LIBRARIES
)