Skip to content

Commit

Permalink
fix pkg_check JsonCpp
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Sep 20, 2019
1 parent 683ad3a commit f40e9a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions FindJsonCpp.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules (JSONCPP jsoncpp)
pkg_check_modules(PC_JSONCPP jsoncpp)
endif()

if(NOT JSONCPP_FOUND)
find_path(JSONCPP_INCLUDE_DIRS json/json.h
PATH_SUFFIXES jsoncpp)
find_library(JSONCPP_LIBRARIES jsoncpp)
endif()
find_path(JSONCPP_INCLUDE_DIRS json/json.h
PATHS ${PC_JSONCPP_INCLUDEDIR}
PATH_SUFFIXES jsoncpp)
find_library(JSONCPP_LIBRARIES jsoncpp
PATHS ${PC_JSONCPP_LIBDIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JsonCpp DEFAULT_MSG JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)
find_package_handle_standard_args(JsonCpp REQUIRED_VARS JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)

mark_as_advanced(JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)

0 comments on commit f40e9a7

Please sign in to comment.