From aee8cb9231b5b2027ff7604faae91a33608d0433 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Sat, 5 Nov 2016 15:57:14 +0700 Subject: [PATCH] pkg-config: Add libcjson_utils.pc --- CMakeLists.txt | 4 ++++ libcjson_utils.pc.in | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 libcjson_utils.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e931b2..5450b05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,8 +50,12 @@ set(SOURCES_UTILS cJSON_Utils.c) add_library(${CJSON_UTILS_LIB} ${HEADERS_UTILS} ${SOURCES_UTILS}) target_link_libraries(${CJSON_UTILS_LIB} ${CJSON_LIB}) +configure_file("${cJSON_utils_SOURCE_DIR}/libcjson_utils.pc.in" + "${cJSON_utils_BINARY_DIR}/libcjson_utils.pc" @ONLY) + install(TARGETS ${CJSON_UTILS_LIB} DESTINATION lib${LIB_SUFFIX}) install(FILES cJSON_Utils.h DESTINATION include/cjson) +install (FILES ${cJSON_utils_BINARY_DIR}/libcjson.pc DESTINATION lib/pkgconfig) set_target_properties(${CJSON_UTILS_LIB} PROPERTIES diff --git a/libcjson_utils.pc.in b/libcjson_utils.pc.in new file mode 100644 index 0000000..67effb4 --- /dev/null +++ b/libcjson_utils.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +libdir=@libdir@ +includedir=${prefix}/include/cJSON +version=@version@ + +Name: libcjson_utils +Version: ${version} +Description: An implementation of JSON Pointer, Patch and Merge Patch based on cJSON. +Libs: -L${libdir} -lcjson_utils +Cflags: -I${includedir} +Requires: libcjson