Re-add creation and installation of the json-c.pc file to the cmake build.

This commit is contained in:
Eric Haszlakiewicz
2018-09-01 15:06:14 -04:00
parent 705e2fd010
commit 994e6c1f60

View File

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