1
0
mirror of https://github.com/DigitalDevices/pvr.octonet.git synced 2023-10-10 13:36:57 +02:00

depdends: Import JsonCpp

Import JsonCpp dependency.

Signed-off-by: Julian Scheel <julian@jusst.de>
This commit is contained in:
Julian Scheel 2016-02-01 16:50:25 +01:00
parent 7a5fa21d14
commit afcba72ae5
3 changed files with 53 additions and 0 deletions

37
FindJsonCpp.cmake Normal file
View File

@ -0,0 +1,37 @@
# -*- 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)
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})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JSONCPP DEFAULT_MSG JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
MARK_AS_ADVANCED(JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)

View File

@ -0,0 +1,15 @@
project(jsoncpp)
cmake_minimum_required(VERSION 2.6)
enable_language(CXX)
set(SOURCES src/lib_json/json_reader.cpp
src/lib_json/json_value.cpp
src/lib_json/json_writer.cpp)
include_directories(${PROJECT_SOURCE_DIR}/include)
add_library(jsoncpp ${SOURCES})
install(TARGETS jsoncpp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(DIRECTORY include/json DESTINATION ${CMAKE_INSTALL_PREFIX}/include/jsoncpp)

View File

@ -0,0 +1 @@
jsoncpp http://mirrors.kodi.tv/build-deps/sources/jsoncpp-src-0.5.0.tar.gz