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