mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
ff353126ec
features.h was renamed but allocator.h wasn't so the latter works with both old and new versions.
35 lines
772 B
CMake
35 lines
772 B
CMake
# - Try to find Jsoncpp
|
|
#
|
|
# Once done, this will define
|
|
# Jsoncpp_FOUND - system has Jsoncpp
|
|
# Jsoncpp_INCLUDE_DIRS - the Jsoncpp include directories
|
|
# Jsoncpp_LIBRARIES - link these to use Jsoncpp
|
|
|
|
find_package(PkgConfig)
|
|
pkg_check_modules(PC_JSONCPP REQUIRED jsoncpp)
|
|
|
|
find_path(JSONCPP_INCLUDE_DIR
|
|
NAMES
|
|
json/allocator.h
|
|
HINTS
|
|
${PC_JSONCPP_INCLUDEDIR}
|
|
${PC_JSONCPP_INCLUDEDIRS}
|
|
PATH_SUFFIXES
|
|
jsoncpp
|
|
PATHS
|
|
${PC_JSONCPP_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(JSONCPP_LIBRARY jsoncpp
|
|
PATHS
|
|
${PC_JSONCPP_LIBRARY_DIRS}
|
|
)
|
|
|
|
mark_as_advanced(JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
|
|
|
|
if(PC_JSONCPP_FOUND)
|
|
set(Jsoncpp_FOUND ON)
|
|
set(Jsoncpp_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
|
|
set(Jsoncpp_LIBRARIES ${JSONCPP_LIBRARY})
|
|
endif(PC_JSONCPP_FOUND)
|