Skip to content

Include directory not exported #5

@rasmusan

Description

@rasmusan

I've had some problems compiling the crystal branch of ROS2 from source with log4cxx for Ubuntu 16.04. When compiling with RCL_LOGGING_IMPLEMENTATION set to rcl_logging_log4cxx, I get the following warning for many packages:

Package 'rcl_logging_log4cxx' exports the include directory
'/home/rsa/ws/ros2/underlay_desktop/install/rcl_logging_log4cxx/share/rcl_logging_log4cxx/cmake/../../../include'
which doesn't exist

The build finally fails on:

CMake Error in CMakeLists.txt:
Imported target "rviz_common::rviz_common" includes non-existent path
"/home/rsa/ws/ros2/underlay_desktop/install/rcl_logging_log4cxx/include"
in its INTERFACE_INCLUDE_DIRECTORIES.

I've fixed it by adding to CMakeLists of rcl_logging_log4cxx:

install(DIRECTORY include/${PROJECT_NAME}
  DESTINATION include/${PROJECT_NAME}
)

After this, everything compiles and works. Is this the "correct" solution? If yes, I can create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions