Stop using absolute paths
This commit is contained in:
parent
bb71db204f
commit
2c98c30a02
@ -607,12 +607,9 @@ 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)
|
||||||
|
|
||||||
# Make sure the paths are absolute.
|
# Make sure the paths are relative.
|
||||||
foreach(p LIB BIN INCLUDE CMAKE)
|
foreach(p LIB BIN INCLUDE CMAKE)
|
||||||
set(var JANSSON_INSTALL_${p}_DIR)
|
set(var JANSSON_INSTALL_${p}_DIR)
|
||||||
if(NOT IS_ABSOLUTE "${${var}}")
|
|
||||||
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Generate the config file for the build-tree.
|
# Generate the config file for the build-tree.
|
||||||
@ -626,7 +623,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/janssonConfig.cmake.in
|
|||||||
|
|
||||||
|
|
||||||
# Generate the config file for the installation tree.
|
# Generate the config file for the installation tree.
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
@ -669,7 +665,7 @@ if (JANSSON_INSTALL)
|
|||||||
|
|
||||||
# Install exports for the install-tree.
|
# Install exports for the install-tree.
|
||||||
install(EXPORT janssonTargets
|
install(EXPORT janssonTargets
|
||||||
NAMESPACE jansson
|
NAMESPACE jansson::
|
||||||
DESTINATION "${JANSSON_INSTALL_CMAKE_DIR}")
|
DESTINATION "${JANSSON_INSTALL_CMAKE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user