useorocos: add separate configuration macros independent of installation #306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds separate CMake macros to UseOROCOS-RTT.cmake to configure existing targets (component and plugin libraries) for Orocos independent of their creation and installation. Most work has been done by @snrkiwi.
orocos_configure_xxx(TARGET ...)
The configuration of a target for Orocos applies the following changes to the given target:
-gnulinux
) to the library output name unless disabled by the macro flagNO_TARGET_SUFFIX
(cmake property OUTPUT_NAME)COMPONENT_VERSION
is set orVERSION
is passed as a macro argument (cmake property VERSION)ComponentLoader
andPluginLoader
(cmake property LIBRARY_OUTPUT_DIRECTORY)RTT_COMPONENT
(for component libraries only)OROCOS-RTT_LIBRARIES
)orocos_use_package()
before. In catkin build mode (ORO_USE_CATKIN
is true) the macro is implicitly called for all Orocos packages listed as build dependencies inpackage.xml
. UnlessOROCOS_NO_AUTO_LINKING
is set, also link to all Orocos library targets.OROCOS_DEFINED_<COMPS|LIBS|TYPES|PLUGINS>
needed for the generation of pkg-config (.pc) files inorocos_generate_package()
.orocos_xxx(TARGET SOURCES ...)
Everything else is only done by the full macros. The behavior of those macros should not have been changed by this patch.
CMAKE_INSTALL_PREFIX
catkin_make
), where the generated pkg-config files cannot be used yet.orocos_configure_xxx()
macro mentioned above.New options for all macros
NO_TARGET_SUFFIX
: do not append the Orocos target to the library and executable names (not required for single target installations)QUIET
: suppress the informational output of the macros