Skip to content

Commit

Permalink
Handle FindEigen3 module's differing definitions (#370)
Browse files Browse the repository at this point in the history
The `FindEigen3.cmake` CMake module sets `EIGEN3_INCLUDE_DIR` instead of `EIGEN3_INCLUDE_DIRS`. At the moment, Ubuntu only includes the `Eigen3Config.cmake` config, while Fedora includes both files. CMake appears to give precedence to the module over the config, so the config never gets processed.

Alternatively, we could pass `NO_MODULE` to the `find_package` call, but this would fail on systems that ONLY have the module, though I'm not aware of any such distributions.
  • Loading branch information
cottsay authored Jan 7, 2019
1 parent 61de77f commit 2077b3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rviz_rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ find_package(ament_index_cpp 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

0 comments on commit 2077b3a

Please sign in to comment.