Change jsoncpp discovery from CMake to pkg-config.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
CMake is deprecated by upstream.
This commit is contained in:
parent
095645ba6e
commit
5906db11da
|
@ -41,7 +41,8 @@ else()
|
|||
add_link_options("$<$<CONFIG:Debug>:${DEBUG_LDFLAGS}>")
|
||||
endif()
|
||||
|
||||
find_package(jsoncpp CONFIG REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
|
||||
# Some distributions do not contain Poco*Config.cmake recipes.
|
||||
find_package(Poco COMPONENTS Foundation Net NetSSL CONFIG)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ target_include_directories(${PROJECT_NAME}
|
|||
PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE jsoncpp_lib)
|
||||
PRIVATE PkgConfig::jsoncpp)
|
||||
|
||||
# If no Poco*Config.cmake recipes are found, look for headers in standard dirs.
|
||||
if(PocoNetSSL_FOUND)
|
||||
|
|
|
@ -9,7 +9,7 @@ target_include_directories(${PROJECT_NAME}_testlib
|
|||
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src>")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}_testlib
|
||||
PRIVATE Poco::Foundation Poco::Net Poco::NetSSL jsoncpp_lib)
|
||||
PRIVATE Poco::Foundation Poco::Net Poco::NetSSL PkgConfig::jsoncpp)
|
||||
|
||||
file(GLOB sources_tests test_*.cpp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user