Skip to content

Commit

Permalink
Use eigen3_cmake_module (#441)
Browse files Browse the repository at this point in the history
* Use eigen3_cmake_module

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Export eigen3_cmake_module buildtool dependency

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz authored Aug 23, 2019
1 parent 564fa38 commit c28f2c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 3 additions & 6 deletions rviz_rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ find_package(rviz_assimp_vendor REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Widgets)

find_package(ament_index_cpp REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(resource_retriever REQUIRED)

# Handle FindEigen3 module's differing definitions
if(NOT DEFINED EIGEN3_INCLUDE_DIRS AND DEFINED EIGEN3_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

# TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later.
if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION)
Expand Down Expand Up @@ -120,7 +116,7 @@ target_include_directories(rviz_rendering
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${OGRE_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${Eigen3_INCLUDE_DIRS}
)
# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
Expand All @@ -132,6 +128,7 @@ ament_target_dependencies(rviz_rendering
)
ament_export_dependencies(
rviz_ogre_vendor
eigen3_cmake_module
Eigen3
resource_retriever
ament_index_cpp)
Expand Down
4 changes: 3 additions & 1 deletion rviz_rendering/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<url type="bugtracker">https://github.com/ros2/rviz/issues</url>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>

<buildtool_export_depend>eigen3_cmake_module</buildtool_export_depend>

<build_depend>ament_index_cpp</build_depend>
<build_depend>eigen</build_depend>
Expand All @@ -29,7 +32,6 @@
<build_export_depend>rviz_ogre_vendor</build_export_depend>

<exec_depend>ament_index_cpp</exec_depend>
<exec_depend>eigen</exec_depend>
<exec_depend>libqt5-core</exec_depend>
<exec_depend>libqt5-gui</exec_depend>
<exec_depend>libqt5-opengl</exec_depend>
Expand Down

0 comments on commit c28f2c2

Please sign in to comment.