-
Notifications
You must be signed in to change notification settings - Fork 408
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
Modern CMake adjustements #91
base: master
Are you sure you want to change the base?
Changes from 6 commits
6ac6c09
4ec06e3
845385d
534605e
9c44336
54fd789
3083a5b
90e9f55
135ee06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,14 +126,15 @@ ENDIF() | |
#####end RPATH | ||
|
||
# Needed so that the generated config.h can be used | ||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) | ||
TARGET_LINK_LIBRARIES(orocos-kdl ${Boost_LIBRARIES}) | ||
TARGET_INCLUDE_DIRECTORIES(orocos-kdl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This additionally needs a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't that what
is supposed to do here? From the documentation:
So probably both are valid approaches to achieve the same at the end. But having both might be redundant. |
||
TARGET_LINK_LIBRARIES(orocos-kdl PUBLIC ${Boost_LIBRARIES} Eigen3::Eigen) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This target was introduced in Eigen 3.3.1, you'll need to add some fallback behavior ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the (very) long absence, is this still relevant? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since KDL doesn't enforce a minimum version, anyone trying to use Eigen<3.3.1 can experience errors, so I think this is still an issue. However, you could just tweak FindEigen3.cmake so that modern CMake targets are made available for use both by KDL itself and projects consuming KDL (make sure this gives precedence to the local file or just add if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
add_library(Eigen3::Eigen INTERFACE IMPORTED)
set_target_properties(Eigen3::Eigen PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
endif() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. currently if Eigen is not found there is no error? Adding eigen with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Eigen is a required dependency, there should be a check somewhere else (and before those lines) to issue an error. I wouldn't delegate such responsibility to the |
||
|
||
INSTALL(TARGETS orocos-kdl | ||
EXPORT OrocosKDLTargets | ||
ARCHIVE DESTINATION lib${LIB_SUFFIX} | ||
LIBRARY DESTINATION lib${LIB_SUFFIX} | ||
PUBLIC_HEADER DESTINATION include/kdl | ||
INCLUDES DESTINATION include | ||
) | ||
|
||
INSTALL(FILES ${UTIL_HPPS} DESTINATION include/kdl/utilities) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hesitant to require newer cmake version higher then 2.8 because: "2.8.12 is the version shipped starting from Ubuntu Trusty (April 2014) or Debian Jessie (April 2015). Other Linux distributions released at approximately the same time have typically newer versions. So that's where we would cut off. Ubuntu Precise (cmake 2.8.7) goes EOL in April 2017, Debian Wheezy (cmake 2.8.9) in May 2018, so probably its a good idea to stay compatible with 2.8.9 until at least next year."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake 3.5 was backported to Trusty a few months ago: https://packages.ubuntu.com/trusty/cmake3.