]> granicus.if.org Git - json-c/commitdiff
CMake: Install pkgconfig file in proper location by default
authorBjörn Esser <besser82@fedoraproject.org>
Sun, 12 Apr 2020 17:21:54 +0000 (19:21 +0200)
committerBjörn Esser <besser82@fedoraproject.org>
Sun, 12 Apr 2020 17:21:54 +0000 (19:21 +0200)
The default location for pkconfig files on most systems is:
  ${CMAKE_INSTALL_LIBDIR}/pkgconfig

Thus the file should get installed in there by default.

CMakeLists.txt

index 1b36f1ca6d424c500a622f385e8ca458e2b2ea1f..60f529a88a4f78ccd2a731b58daf0cfbbfc6e0ba 100644 (file)
@@ -423,7 +423,7 @@ if (UNIX OR MINGW OR CYGWIN)
     SET(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
     SET(VERSION ${PROJECT_VERSION})
     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")
+    set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
     install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
 endif ()