CMake Frontend¶
To utilise ecl cmake modules, you'll need two things:
- Include
ecl_buildas a dependency in your package'smanifest.xml(this allows you to rosbuild_include). - Set up your
CMakeLists.txtto bring in ecl's cmake macro libraries, similar to the following example
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
# These just bring in the macro definitions, they don't actually do anything
rosbuild_include(ecl_build ecl_build_utilities)
rosbuild_include(ecl_build ecl_platform_detection)
rosbuild_include(ecl_build ecl_ros_utilities)
# The following are an example of some of the macro api available
# Refer to ecl_build's documentation or the cmake files themselves for more
# details.
ecl_detect_platform() # general purpose platform sniffer
ecl_add_uninstall_target()
ecl_ros_output_paths() # define bin, lib as the standard ros package output paths
# Actual build stuff here
ecl_summary_platform()