-
Notifications
You must be signed in to change notification settings - Fork 63
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
console_bridgeConfig.cmake will not reroot its include directories in a crosscompilation build. #44
Comments
I think the proper way of solving this problem (avoid hard-coding installation paths in CMake configuration files) is to make the urdfdom CMake configuration files relocatable. Related CMake docs: https://cmake.org/cmake/help/v3.8/manual/cmake-packages.7.html#creating-relocatable-packages .
|
This might also fix the problem and be the better solution, however it will require more work. For now it might still be a good idea to include the fix I posted since it changes only one CMake call. |
Note the only one CMake call that it changes has subtle implications: the |
See discussion in ros#44
@mightyCelu PR #45 would solve your problem? |
I am not sure about the configure_file semantics but it looks to me like the change to line 6 resp. 8 in the template will not change my problem, it will still contain the install-path which is not prefixed by an optional CMAKE_FIND_ROOT_PATH. edit: I am mistaken, after reading the |
fixed by #45 |
When building ROS in a cross-compiled build,
console_bridgeConfig.cmake
will setconsole_bridge_INCLUDE_DIRS
to its installation include directory.This will cause e.g.
/usr/include
to be added to theINCLUDE_DIRECTORIES
, if the requiring package does not manually prefix the directories with theCMAKE_FIND_ROOT_PATH
. As a result, builds might fail, e.g. because the hostsmath.h
is included which likely contains invalid ASM for the target system.I am not sure about the convention in this regard, but looking at e.g.
FindBoost.cmake
they usefind_path
which returns the prefixed path.I applied this patch in my case which fixes the issue:
The text was updated successfully, but these errors were encountered: