Skip to content

pkg-config does not include required components from dependencies #450

@azeey

Description

@azeey

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build? gz-utils3

Description

  • Expected behavior: The pkg-config file generated for a project to include required components from dependencies.
  • Actual behavior: The generated file only includes the required core library of the dependency, but not any additional required components

Steps to reproduce

  1. Add the line
gz_find_package(gz-utils3 REQUIRED COMPONENTS log)

Right before gz_configure_build in

gz_configure_build(QUIT_IF_BUILD_ERRORS)

3. Assuming you have gz-utils3-log installed, build project and read the contents of cmake/pkgconfig/gz-core_no_deps.pc in the build directory. You should see

prefix=${pcfiledir}/../../
libdir=${prefix}/lib
includedir=${prefix}/include/gz/core_no_deps0

Name: Gazebo core_no_deps
Description: A set of core_no_deps classes for robot applications
Version: 0.1.0
Requires: gz-cmake4 >= 1.1 gz-utils3
Requires.private: 
Libs: -L${libdir} -lgz-core_no_deps 
Libs.private: 
CFlags: -I${includedir} -std=c++11

In the Requires clause, there is gz-utils3, but not gz-utils3-log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking changeBreaks API, ABI or behavior. Must target unstable version.bugSomething isn't working

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions