You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
# Find json-rcp-cpp
|
|
#
|
|
# Find the JSONCpp includes and library
|
|
#
|
|
# if you nee to add a custom library search path, do it via via CMAKE_FIND_ROOT_PATH
|
|
#
|
|
# This module defines
|
|
# JSON_RCP_CPP_INCLUDE_DIRS, where to find json.h, etc.
|
|
# JSON_RCP_CPP_LIBRARIES, the libraries needed to use jsoncpp.
|
|
# JSON_RCP_CPP_FOUND, If false, do not try to use jsoncpp.
|
|
|
|
# only look in default directories
|
|
find_path(
|
|
JSON_RPC_CPP_INCLUDE_DIR
|
|
NAMES jsonrpc/rpc.h
|
|
PATH_SUFFIXES jsonrpc
|
|
DOC "json-rpc-cpp include dir"
|
|
)
|
|
|
|
find_library(
|
|
JSON_RPC_CPP_LIBRARY
|
|
NAMES jsonrpc
|
|
DOC "json-rpc-cpp library"
|
|
)
|
|
|
|
set (JSON_RPC_CPP_INCLUDE_DIRS ${JSON_RPC_CPP_INCLUDE_DIR})
|
|
set (JSON_RPC_CPP_LIBRARIES ${JSON_RPC_CPP_LIBRARY})
|
|
|
|
# message (" - json-rcp-cpp header : ${JSON_RPC_CPP_INCLUDE_DIRS}")
|
|
# message (" - json-rcp-cpp lib : ${JSON_RPC_CPP_LIBRARIES}")
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
# handle the QUIETLY and REQUIRED arguments and set JSON_RPC_CPP_FOUND to TRUE
|
|
# if all listed variables are TRUE
|
|
find_package_handle_standard_args(json_rpc_cpp DEFAULT_MSG
|
|
JSON_RPC_CPP_LIBRARY JSON_RPC_CPP_INCLUDE_DIR)
|
|
|
|
|
|
# include(FindPackageMessage)
|
|
# find_package_message ("json-rpc-cpp" "found" "bla")
|
|
|
|
|
|
mark_as_advanced (JSON_RPC_CPP_INCLUDE_DIR JSON_RPC_CPP_LIBRARY)
|
|
|