From: Eric Haszlakiewicz Date: Sat, 1 Sep 2018 19:06:14 +0000 (-0400) Subject: Re-add creation and installation of the json-c.pc file to the cmake build. X-Git-Tag: json-c-0.14-20200419~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=994e6c1f6030a052429c50a917a3991c5e2e7646;p=thirdparty%2Fjson-c.git Re-add creation and installation of the json-c.pc file to the cmake build. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 461b0192..9c7444f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,4 +250,10 @@ install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib ) +if (UNIX OR MINGW OR CYGWIN) + configure_file(json-c.pc.in json-c.pc @ONLY) + set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files") + install(FILES ${CMAKE_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}") +endif () + install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/json-c)