-
Notifications
You must be signed in to change notification settings - Fork 163
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
Nested include directories complicates header inclusion logic #964
Comments
So I guess we need more to know about your use-case. We intentionally moved these down a directory level (see the long discussion at ros2/ros2#1150), and this solves a real problem that users are having. We've modified the CMake logic in the core to handle all of this, so the change should be transparent to users. The question is why this is causing trouble for you and your project, and what steps we can take to mitigate that. |
Okay, I am using ros2 libraries within Unreal Engine so we can tx/rx ROS2 msgs from within Unreal projects. Currently this (a fork of rclUE) is how I am including the headers https://github.com/Greenroom-Robotics/rclUE/blob/whiskey/Source/rclUE/rclUE.Build.cs#L50 These changes complicates things slightly, and short of writing a Cmake file parser I'm not sure what the elegant solution would be. |
OK, thanks, that helps. We'll take a look and see if there is anything we can do to help your use-case. @sloretz when you get a chance can you take a look and provide any thoughts on how to find the include path from non-CMake systems? |
Thanks @clalancette! This is my current work around, it works for the subset of packages this uses, but I imagine it's quite brittle.
|
Sure, but I think this is a question that needs to be turned around. @russkel How does the build system normally get include directories from software that was built using a different build system? This has to be a use case it deals with. In Find Modules try to find the software on the system, usually by making educated guesses and checking. For example, a Find Module would call call |
The way it was done before CMake et al: providing include directories and lib paths.
Unreal Build Tool scripts are written in C# (don't ask) so one can do anything like this if they write the code by hand. Ultimately my hack works and lets me carry on with the job, but I wouldn't be opposed to some kind of yaml file that lists include dirs and libs for each package. Reading such a thing would be trivial. Hell, if it's easy enough one could parse the cmake files directly (but from my quick look at that it didn't seem that straight forward). |
Does Unreal Build Tool have helper functions for figuring out where include directories and libraries are?
Definitely not straightforward. Maybe
Do you mean a yaml file provided by each ROS 2 package, or a file hard-coded into |
A cursory search didn't find anything. Here is a brief overview if you're interested: https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/BuildTools/UnrealBuildTool/ThirdPartyLibraries/
As for cmake generation, this seems to be how it's done in cmake: https://www.scivision.dev/cmake-generate-pkg-config/ |
One other thing that I might suggest is using the ament_index for storing this data. We still need to define a file format (so it might be a good idea to reuse an existing one), but then we can store it and look it up via the ament_index. I'm not sure it is a better option than just using |
Bug report
As mentioned by @pablogs9 originally in #959 (comment) the added PROJECT_NAME to include paths complicates other build logic that doesn't rely on cmake files.
Required Info:
Steps to reproduce issue
Expected behavior
Non-nested
rcl
directory, i.e.include/rcl/context.h
etcActual behavior
The above shows a nested
rcl
directory.Additional information
Feature request
Feature description
Implementation considerations
The text was updated successfully, but these errors were encountered: