Skip to content

YARP_managerConfig.cmake requires FindTinyXML.cmake to be in CMAKE_MODULE_PATH, but YARP does not install it #1736

Closed
@traversaro

Description

@traversaro

Describe the bug
If you have find_package(YARP COMPONENTS manager REQUIRED) using a YARP installed with YCM, you get the following error:

CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:65 (find_package):
  By not providing "FindTinyXML.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TinyXML", but
  CMake did not find one.

  Could not find a package configuration file provided by "TinyXML" with any
  of the following names:

    TinyXMLConfig.cmake
    tinyxml-config.cmake

  Add the installation prefix of "TinyXML" to CMAKE_PREFIX_PATH or set
  "TinyXML_DIR" to a directory containing one of the above files.  If
  "TinyXML" provides a separate development package or SDK, be sure it has
  been installed.

To Reproduce
Configure a downstream project with find_package(YARP COMPONENTS manager REQUIRED) in its CMakeLists.txt , do not have find_package(YCM) in the same downstream project and make sure that YARP was configured/installed using an external YCM

Expected behavior
find_package(YARP COMPONENTS manager REQUIRED) should work fine.

Configuration (please complete the following information):

  • OS: Ubuntu 16.04
  • yarp version: e0b0607
  • cmake: 3.5

Proposed solution
If YARP is configured using an external YCM (and so it is not installing YCM CMake modules) a find_dependency(YCM) should be added in YARPConfig.cmake .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions