ros-industrial/abb_librws

ubuntu xenial: Invalid arguments to find_dependency

gavanderhoorn opened this issue · 5 comments

When attempting to build an application which depends on abb_librws with CMake, the build is aborted with the following error:

CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:45 (message):
  Invalid arguments to find_dependency
Call Stack (most recent call first):
  /home/user/ros_ws/devel/share/abb_librws/abb_librwsConfig.cmake:10 (find_dependency)
  CMakeLists.txt:39 (find_package)

This happens on an up-to-date Ubuntu Xenial, with CMake 3.5.1.

It looks like the cause is this line:

# Find dependencies
find_dependency(Poco 1.4.3 REQUIRED COMPONENTS Foundation Net Util XML)

CMake 3.5.1 does not support REQUIRED nor COMPONENTS in find_dependency(..).

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

@jontje: we may want to introduce a dummy package into the CI setup which exercises the CMake infrastructure installed as part of the install(..) of abb_librws. That would've let us know about this problem before merging #69.

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

For example use find_package instead? Are there any pros/cons?

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

For example use find_package instead? Are there any pros/cons?

find_dependency just gives a fancier error message if a dep is not found, i.e. saying something similar to "abb_librws is not found because it was unable to find Poco" instead of just "Poco not found", so using find_package here is perfectly ok.