fix find_path for newer jsoncpp installations

stable-4.0
mckaygerhard 2023-09-12 20:20:49 -04:00
parent a91668bbf6
commit 2292239f86
1 changed files with 4 additions and 3 deletions

View File

@ -8,14 +8,15 @@ option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JSONCPP. May cause seg
if(ENABLE_SYSTEM_JSONCPP)
find_library(JSON_LIBRARY NAMES jsoncpp)
find_path(JSON_INCLUDE_DIR json/features.h PATH_SUFFIXES jsoncpp)
find_path(JSON_INCLUDE_DIR json/allocator.h PATH_SUFFIXES jsoncpp)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JSONCPP DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR)
find_package_handle_standard_args(Json DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR)
if(JSONCPP_FOUND)
if(JSON_FOUND)
message(STATUS "Using system JSONCPP library.")
endif()
endif()
if(NOT JSONCPP_FOUND)