Fix error when finding the jsoncpp library (#356)
This commit is contained in:
parent
c9dd14bde5
commit
978bd7c32f
|
@ -3,7 +3,7 @@ matrix:
|
|||
- os: linux
|
||||
dist: xenial
|
||||
- os: osx
|
||||
osx_image: xcode11
|
||||
osx_image: xcode11.3
|
||||
|
||||
sudo: required
|
||||
|
||||
|
@ -38,6 +38,7 @@ addons:
|
|||
- lz4
|
||||
- mariadb
|
||||
- sqlite3
|
||||
update: true
|
||||
before_install:
|
||||
- wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
|
||||
- tar xf release-1.10.0.tar.gz
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
# only look in default directories
|
||||
find_path(
|
||||
JSONCPP_INCLUDE_DIR
|
||||
NAMES jsoncpp/json/json.h json/json.h
|
||||
NAMES json/json.h
|
||||
DOC "jsoncpp include dir"
|
||||
PATH_SUFFIXES jsoncpp
|
||||
)
|
||||
|
||||
find_library(
|
||||
|
@ -43,20 +44,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||
|
||||
endif()
|
||||
|
||||
# find JSONCPP_INCLUDE_PREFIX
|
||||
find_path(
|
||||
JSONCPP_INCLUDE_PREFIX
|
||||
NAMES json.h
|
||||
PATH_SUFFIXES jsoncpp/json json
|
||||
)
|
||||
|
||||
if (${JSONCPP_INCLUDE_PREFIX} MATCHES "jsoncpp")
|
||||
set(JSONCPP_INCLUDE_PREFIX "jsoncpp")
|
||||
set(JSONCPP_INCLUDE_DIRS "${JSONCPP_INCLUDE_DIRS}/jsoncpp")
|
||||
else()
|
||||
set(JSONCPP_INCLUDE_PREFIX "")
|
||||
endif()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set JSONCPP_FOUND to TRUE
|
||||
# if all listed variables are TRUE, hide their existence from configuration view
|
||||
|
|
Loading…
Reference in New Issue