Browse Source

Merge pull request #474 from Jehan/fix-pc-file-cmake

Installation directories empty with CMake in pkg-config.
tags/json-c-0.14-20200419
Eric Haszlakiewicz GitHub 6 years ago
parent
commit
3e81b4abe3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      CMakeLists.txt

+ 6
- 0
CMakeLists.txt View File

@@ -259,6 +259,12 @@ install(TARGETS ${PROJECT_NAME}
) )


if (UNIX OR MINGW OR CYGWIN) if (UNIX OR MINGW OR CYGWIN)
SET(prefix ${CMAKE_INSTALL_PREFIX})
# exec_prefix is prefix by default and CMake does not have the
# concept.
SET(exec_prefix ${CMAKE_INSTALL_PREFIX})
SET(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
SET(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
configure_file(json-c.pc.in json-c.pc @ONLY) 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_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}") install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")


Loading…
Cancel
Save