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
|
Description: Find jsoncpp lib
Author: Andrew Lee (李健秋) <[email protected]>
---
Origin: Debian
Forwarded: not-needed
Reviewed-By: Andrew Lee (李健秋) <[email protected]>
Last-Update: 2019-08-19
--- a/src/CMakeLists.txt
b/src/CMakeLists.txt
@@ -100,7 100,18 @@ if(USE_CUSTOM_LIBCXX)
endif()
if(USE_SYSTEM_JSONCPP)
- list(APPEND EXTRA_LIBS jsoncpp)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules (JSONCPP jsoncpp)
endif()
if(NOT JSONCPP_FOUND)
find_path(JSONCPP_INCLUDE_DIRS json/json.h
PATH_SUFFIXES jsoncpp)
find_library(JSONCPP_LIBRARIES jsoncpp)
endif()
include_directories(${JSONCPP_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${JSONCPP_LIBRARIES})
endif()
target_link_libraries(${LIBNAME} ${EXTRA_LIBS} ${CMAKE_DL_LIBS})
|