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

Using install(DIRECTORY ... TYPE ...) results in "can't find error" #471

Open
sprenger120 opened this issue Jun 28, 2023 · 1 comment
Open
Labels

Comments

@sprenger120
Copy link

sprenger120 commented Jun 28, 2023

In my project I use something like this

install(DIRECTORY
        include
        TYPE INCLUDE)

This causes the following error

CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:100 (message):
  ament_cmake_symlink_install_directory() can't find
  '/home/user/ros2ws/src/package/TYPE'
Call Stack (most recent call first):
  ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:326 (ament_cmake_symlink_install_directory)
  cmake_install.cmake:46 (include)

It looks like ament is not expecting these kind of options. I would simply change my code to make it work but a package I depend on installs its stuff using the code mentioned above and I can't change it.
I think I found the function, that is responsible here

@cottsay
Copy link
Contributor

cottsay commented Jul 6, 2023

Yeah, I think that we need to update this argument parsing logic: https://github.com/ament/ament_cmake/blob/rolling/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in#L18

...based on this full signature: https://cmake.org/cmake/help/latest/command/install.html#installing-directories

I think we may need to plumb the values deeper into the function calls in that file, but it might be easier and safer to come up with a way to "fall back" to a normal install if symlink installation doesn't support all of the given arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants