-
Notifications
You must be signed in to change notification settings - Fork 49
Enable locally built Dependency to override system installed version of the dependency #295
Comments
In So that locally built dependencies are found first. |
Another issue I have ran into is that it finds the GTest package but all the cmake variables are empty except find_package(GTest REQUIRED)
if(NOT TARGET GTest::GTest)
add_library(GTest::GTest INTERFACE IMPORTED)
set_target_properties(GTest::GTest PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}")
if (${GTEST_LIBRARIES})
set_target_properties(GTest::GTest PROPERTIES INTERFACE_LINK_LIBRARIES "${GTEST_LIBRARIES}")
else()
if (MSVC)
set_target_properties(GTest::GTest PROPERTIES INTERFACE_LINK_LIBRARIES "gtest.lib")
else()
set_target_properties(GTest::GTest PROPERTIES INTERFACE_LINK_LIBRARIES "libgtest.so")
endif()
endif()
endif()
if(NOT TARGET GTest::Main)
add_library(GTest::Main INTERFACE IMPORTED)
set_target_properties(GTest::Main PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}")
if (${GTEST_MAIN_LIBRARIES})
set_target_properties(GTest::Main PROPERTIES INTERFACE_LINK_LIBRARIES "${GTEST_MAIN_LIBRARIES}")
else()
if (MSVC)
set_target_properties(GTest::Main PROPERTIES INTERFACE_LINK_LIBRARIES "gtest_main.lib")
else()
set_target_properties(GTest::Main PROPERTIES INTERFACE_LINK_LIBRARIES "libgtest_main.so")
endif()
endif()
endif() |
The other issue I have ran into is related having dependencies in my workspace that are also installed on the system. The interesting thing is that find_package finds the correct config but when building it is using the system version for headers and libraries unless I add the BEFORE shown below. This means that I am unable to leverage cmake targets because of this issue for packages that are in workspace and also installed on the system. Before: include_directories(${FCL_INCLUDE_DIRS})
link_directories(${FCL_LIBRARY_DIRS}) After: include_directories(BEFORE ${FCL_INCLUDE_DIRS})
link_directories(BEFORE ${FCL_LIBRARY_DIRS}) |
The other issue I ran into which is not related to this issue but explained here. Oddly this issue was not present until I started building on Windows, and not sure why this was not an issues when I was building the same package on linux. |
@ooeygui I am working on getting the motion planning packages to build and ran into an issue where OMPL has incorrect include path for Eigen. Not sure if this an error in how ompl generates it cmake Config or related to how they are packaged for windows. When building the ros package for windows do they get moved? If so then this will be a problem for OMPL because it hard codes the path for its dependencies in omplConfig.cmake instead of leveraging cmake find_dependency. Issue is that
|
OMPL is built using vcpkg. In the ROS deployment, the config file I'm rebuilding ompl in vcpkg to see where that is coming in from. |
@ooeygui The fix for ompl has been merged. What is the process for getting the fix included into the ros windows release? |
What:
Customer has a requirement to support building a dependency using non-default parameters. However, while the dependency is building in the workspace the system version of that dependency overrides the local version.
Why:
Customer requires a precision version of bullet3, which is not currently the default build.
AB#509401
The text was updated successfully, but these errors were encountered: