pkg-config: Add libcjson_utils.pc

This commit is contained in:
Max Bruckner 2016-11-05 15:57:14 +07:00
parent 3d546c7036
commit aee8cb9231
2 changed files with 15 additions and 0 deletions

View File

@ -50,8 +50,12 @@ set(SOURCES_UTILS cJSON_Utils.c)
add_library(${CJSON_UTILS_LIB} ${HEADERS_UTILS} ${SOURCES_UTILS}) add_library(${CJSON_UTILS_LIB} ${HEADERS_UTILS} ${SOURCES_UTILS})
target_link_libraries(${CJSON_UTILS_LIB} ${CJSON_LIB}) 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(TARGETS ${CJSON_UTILS_LIB} DESTINATION lib${LIB_SUFFIX})
install(FILES cJSON_Utils.h DESTINATION include/cjson) 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} set_target_properties(${CJSON_UTILS_LIB}
PROPERTIES PROPERTIES

11
libcjson_utils.pc.in Normal file
View File

@ -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