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:
parent
7a5fa21d14
commit
afcba72ae5
37
FindJsonCpp.cmake
Normal file
37
FindJsonCpp.cmake
Normal 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)
|
15
depends/common/jsoncpp/CMakeLists.txt
Normal file
15
depends/common/jsoncpp/CMakeLists.txt
Normal 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)
|
1
depends/common/jsoncpp/jsoncpp.txt
Normal file
1
depends/common/jsoncpp/jsoncpp.txt
Normal file
@ -0,0 +1 @@
|
||||
jsoncpp http://mirrors.kodi.tv/build-deps/sources/jsoncpp-src-0.5.0.tar.gz
|
Loading…
Reference in New Issue
Block a user