Repository navigation
Conversation
- Parity with ament_index_python function get_package_prefix(package_name)
|
This function gets the contents of the file: Maybe it should be refactored to use your new function (they're the same except the line that reads the file AFAICT). |
|
@wjwwood Good point - I'll make the change |
|
@wjwwood Upon closer inspection, changing ament_index_get_resource to use the new function doesn't really make anything better. The new function is as long as the old function (because of the handling of ARG_PREFIX_PATH and checking if the file exists) , and contains a bunch of changes that I can't test very effectively. I don't really want to risk messing it up |
|
How about changing the semantic the existing CMake function |
|
Well, I assumed that you could avoid much of the argument checking and just pass most arguments to the function that gets the directory. You'd only really need to extract the output var for the contents and inject the local var name for the path (to be used to read the file contents). |
|
Please see #155 which implements the mentioned alternative and comment if that works for your use case. |
|
When I test #155, building builtin_interfaces fails |
|
Closing in favor of #155 |
Need a way to do this but from a CMakeLists file. ament_cmake_index_has_resource is close, but doesn't tell you the path - it just tells you that the resource exists