fix find_path for newer jsoncpp installations
This commit is contained in:
parent
8afa292ed8
commit
8760885750
@ -8,17 +8,17 @@ 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)
|
||||
if(NOT JSON_FOUND)
|
||||
message(STATUS "Using bundled JSONCPP library.")
|
||||
set(JSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp)
|
||||
set(JSON_LIBRARY jsoncpp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user