Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ign-cmake2' into bump_270pre1
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Feb 4, 2021
2 parents f831517 + b03ca34 commit d5175f0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ set(ign_version_output "${PROJECT_NAME_LOWER}-config-version.cmake")
set(ign_config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME_LOWER}")
set(ign_pkgconfig_input "${CMAKE_CURRENT_SOURCE_DIR}/config/ignition-cmake.pc.in")
set(ign_pkgconfig_output "${CMAKE_BINARY_DIR}/ignition-cmake${PROJECT_VERSION_MAJOR}.pc")
set(ign_pkgconfig_install_dir "${IGN_LIB_INSTALL_DIR}/pkgconfig")
set(ign_utilities_target ${PROJECT_EXPORT_NAME}-utilities)
set(ign_utilities_import_target_name ${PROJECT_EXPORT_NAME}::${ign_utilities_target})
set(ign_utilities_target_output_filename "${ign_utilities_target}-targets.cmake")
Expand Down Expand Up @@ -86,11 +87,16 @@ install(

#--------------------------------------
# Configure and install the pkgconfig file (needed for utilities headers)
file(RELATIVE_PATH
IGN_PC_CONFIG_RELATIVE_PATH_TO_PREFIX
"${CMAKE_INSTALL_PREFIX}/${ign_pkgconfig_install_dir}"
"${CMAKE_INSTALL_PREFIX}"
)
configure_file(${ign_pkgconfig_input} ${ign_pkgconfig_output} @ONLY)

install(
FILES ${ign_pkgconfig_output}
DESTINATION ${IGN_LIB_INSTALL_DIR}/pkgconfig
DESTINATION ${ign_pkgconfig_install_dir}
COMPONENT pkgconfig)

#============================================================================
Expand Down
8 changes: 7 additions & 1 deletion cmake/IgnPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,18 @@ function(_ign_create_pkgconfig)
endif()

set(pkgconfig_output "${CMAKE_BINARY_DIR}/cmake/pkgconfig/${target_name}.pc")
set(pkgconfig_install_dir "${IGN_LIB_INSTALL_DIR}/pkgconfig")
file(RELATIVE_PATH
PC_CONFIG_RELATIVE_PATH_TO_PREFIX
"${CMAKE_INSTALL_PREFIX}/${pkgconfig_install_dir}"
"${CMAKE_INSTALL_PREFIX}"
)

configure_file(${pkgconfig_input} ${pkgconfig_output} @ONLY)

install(
FILES ${pkgconfig_output}
DESTINATION ${IGN_LIB_INSTALL_DIR}/pkgconfig
DESTINATION ${pkgconfig_install_dir}
COMPONENT pkgconfig)

endfunction()
Expand Down
2 changes: 1 addition & 1 deletion cmake/ignition-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ foreach(component ${@PKG_NAME@_FIND_COMPONENTS})
endforeach()

# Specify the doxygen tag file
set(@PROJECT_NAME_NO_VERSION_UPPER@_DOXYGEN_TAGFILE "@CMAKE_INSTALL_PREFIX@/@IGN_DATA_INSTALL_DIR@/@[email protected]")
set(@PROJECT_NAME_NO_VERSION_UPPER@_DOXYGEN_TAGFILE "${PACKAGE_PREFIX_DIR}/@IGN_DATA_INSTALL_DIR@/@[email protected]")

# Specify the API url. This is where the doxygen tag file will resolve URLS to.
set(@PROJECT_NAME_NO_VERSION_UPPER@_API_URL "https://ignitionrobotics.org/api/@IGN_DESIGNATION@/@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@")
2 changes: 1 addition & 1 deletion cmake/pkgconfig/ignition-component.pc.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=@CMAKE_INSTALL_PREFIX@
prefix=${pcfiledir}/@PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/ignition/@IGN_DESIGNATION@@PROJECT_VERSION_MAJOR@

Expand Down
2 changes: 1 addition & 1 deletion cmake/pkgconfig/ignition.pc.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=@CMAKE_INSTALL_PREFIX@
prefix=${pcfiledir}/@PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/ignition/@IGN_DESIGNATION@@PROJECT_VERSION_MAJOR@

Expand Down
2 changes: 1 addition & 1 deletion config/ignition-cmake.pc.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=@CMAKE_INSTALL_PREFIX@
prefix=${pcfiledir}/@IGN_PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/ignition/@IGN_DESIGNATION@@PROJECT_VERSION_MAJOR@

Name: Ignition @IGN_DESIGNATION@
Expand Down

0 comments on commit d5175f0

Please sign in to comment.