Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify required components in pkg-config #451

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cmake/gz-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ endif()
set(@LEGACY_PROJECT_PREFIX@_LIBRARIES ${@PKG_NAME@_LIBRARIES})
set(@LEGACY_PROJECT_PREFIX@_INCLUDE_DIRS ${@PKG_NAME@_INCLUDE_DIRS})

# This macro is used by gz-cmake to automatically configure the pkgconfig
# files for Gazebo projects.
gz_pkg_config_entry(@PKG_NAME@ "@PKG_NAME@")
# required pkg-config components
set(@PKG_NAME@_required_components)

# Find each of the components requested by find_package(~)
foreach(component ${@PKG_NAME@_FIND_COMPONENTS})
Expand All @@ -166,6 +165,8 @@ foreach(component ${@PKG_NAME@_FIND_COMPONENTS})
# find_dependency(~)
find_dependency(@PKG_NAME@-${component} @PROJECT_VERSION_FULL_NO_SUFFIX@ EXACT)

set(@PKG_NAME@_required_components "${@PKG_NAME@_required_components} @PKG_NAME@-${component}")

else()

# If this is an optional component, use find_package(~) instead of
Expand All @@ -177,6 +178,11 @@ foreach(component ${@PKG_NAME@_FIND_COMPONENTS})

endforeach()

# This macro is used by gz-cmake to automatically configure the pkgconfig
# files for Gazebo projects.
gz_pkg_config_entry(@PKG_NAME@ "@PKG_NAME@ ${@PKG_NAME@_required_components}")
unset(@PKG_NAME@_required_components)

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

Expand Down
Loading