Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 10 additions & 32 deletions FindJsonCpp.cmake
Original file line number Diff line number Diff line change
@@ -1,37 +1,15 @@
# -*- cmake -*-

# - Find JSONCpp
# Find the JSONCpp includes and library
# This module defines
# JSONCPP_FOUND, System has libjsoncpp.
# JSONCPP_INCLUDE_DIRS - The libjsoncpp include directories.
# JSONCPP_LIBRARIES - The libraries needed to use libjsoncpp.
# JSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp.

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_JSONCPP jsoncpp QUIET)
endif()

pkg_check_modules(PC_JSONCPP jsoncpp)

SET(JSONCPP_DEFINITIONS ${PC_JSONCPP_CFLAGS_OTHER})

# include dir
FIND_PATH(JSONCPP_INCLUDE_DIR json/reader.h
HINTS ${PC_JSONCPP_INCLUDE_DIR} ${PC_JSONCPP_INCLUDE_DIRS}
PATH_SUFFIXES jsoncpp
)

# library
FIND_LIBRARY(JSONCPP_LIBRARY
NAMES jsoncpp
HINTS ${PC_JSONCPP_LIBDIR} ${PC_JSONCPP_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib
)

SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
SET(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
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 REQUIRED_VARS JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(JSONCPP DEFAULT_MSG JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)

MARK_AS_ADVANCED(JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
mark_as_advanced(JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)
17 changes: 0 additions & 17 deletions depends/common/jsoncpp/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions depends/common/jsoncpp/flags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_LIBDIR=lib
2 changes: 1 addition & 1 deletion depends/common/jsoncpp/jsoncpp.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3671ba6051e0f30849942cc66d1798fdf0362d089343a83f704c09ee7156604f
51828cf3574281d2b79ec2a1c56a9e4c20cc1103711321ea96384cffb8d2d904
2 changes: 1 addition & 1 deletion depends/common/jsoncpp/jsoncpp.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jsoncpp http://mirrors.kodi.tv/build-deps/sources/jsoncpp-1.8.3.tar.gz
jsoncpp https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.9.8.tar.gz
Loading