Fix generated pkg-config file using cmake.

Fixed the generated `jansson.pc` with cmake to be consistent with the
one generated using GNU Autotools.
This commit is contained in:
Ameya Vikram Singh 2017-10-29 23:57:25 +05:30
parent 9e7847ed26
commit 89f0dde7ff

View File

@ -599,8 +599,9 @@ set(JANSSON_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation
# (We use the same files as ./configure does, so we # (We use the same files as ./configure does, so we
# have to defined the same variables used there). # have to defined the same variables used there).
set(prefix ${CMAKE_INSTALL_PREFIX}) set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\${prefix}")
set(libdir ${CMAKE_INSTALL_PREFIX}/${JANSSON_INSTALL_LIB_DIR}) set(libdir "\${exec_prefix}/${JANSSON_INSTALL_LIB_DIR}")
set(includedir "\${prefix}/${JANSSON_INSTALL_INCLUDE_DIR}")
set(VERSION ${JANSSON_DISPLAY_VERSION}) set(VERSION ${JANSSON_DISPLAY_VERSION})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/jansson.pc.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/jansson.pc.in
${CMAKE_CURRENT_BINARY_DIR}/jansson.pc @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc @ONLY)