Find system jsoncpp via pkg-config, add system include

This commit is contained in:
Martin Kröning
2020-06-18 23:27:12 +02:00
parent 960c57c4f3
commit 092cffa182
2 changed files with 6 additions and 6 deletions
+2 -4
View File
@@ -1,8 +1,6 @@
if(WITH_SYSTEM_JSONCPP)
find_library(JSONCPP_LIBRARY jsoncpp)
if(JSONCPP_LIBRARY MATCHES "JSONCPP_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Need jsoncpp.")
endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP REQUIRED jsoncpp)
else()
list(APPEND JSON_SRC
"jsoncpp/src/lib_json/json_reader.cpp"
+4 -2
View File
@@ -449,7 +449,7 @@ else()
endif()
if(WITH_SYSTEM_JSONCPP)
list(APPEND SMDATA_LINK_LIB ${JSONCPP_LIBRARY})
list(APPEND SMDATA_LINK_LIB ${JSONCPP_LIBRARIES})
else()
list(APPEND SMDATA_LINK_LIB "jsoncpp")
endif()
@@ -617,7 +617,9 @@ if(NOT APPLE)
"${SM_EXTERN_DIR}/glew-1.5.8/include")
endif()
if(NOT WITH_SYSTEM_JSONCPP)
if(WITH_SYSTEM_JSONCPP)
list(APPEND SM_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIRS})
else()
list(APPEND SM_INCLUDE_DIRS
"${SM_EXTERN_DIR}/jsoncpp/include")
endif()