Skip to content
Snippets Groups Projects
Select Git revision
  • 1b032a9d78c4933aeeb90fb54bd399dc76e6b2b5
  • master default protected
  • grasping_sample
3 results

CMakeLists.txt

Blame
  • CMakeLists.txt 2.58 KiB
    cmake_minimum_required(VERSION 2.8.3)
    project(sample_applications)
    
    add_compile_options(-std=c++14)
    set(GCC_COVERAGE_COMPILE_FLAGS "-fpermissive")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS} ${GAZEBO_CXX_FLAGS}")
    
    # Find catkin macros and libraries if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) is used, also find other
    # catkin packages
    find_package(catkin REQUIRED
            COMPONENTS controller_manager
            effort_controllers
            gazebo_ros
            genmsg
            joint_state_controller
            joint_state_publisher
            joint_trajectory_controller
            robot_state_publisher
            roscpp
            std_msgs
            xacro
            moveit_core
            moveit_visual_tools
            moveit_ros_planning
            moveit_ros_planning_interface
            controller_interface
            hardware_interface)
    
    # System dependencies are found with CMake's conventions
    find_package(PkgConfig REQUIRED)
    
    # ################################################################################################################################
    # catkin specific configuration ##
    # ################################################################################################################################
    # The catkin_package macro generates cmake config files for your package Declare things to be passed to dependent projects
    catkin_package(CATKIN_DEPENDS
            moveit_core
            moveit_visual_tools
            moveit_ros_planning_interface
            controller_interface
            hardware_interface
            pluginlib
            DEPENDS
            # system_lib
            )
    
    # ################################################################################################################################
    # Build ##
    # ################################################################################################################################
    
    # Specify additional locations of header files Your package locations should be listed before other locations
    include_directories(${catkin_INCLUDE_DIRS})
    
    add_executable(SampleConstraintPlanner src/SampleConstraintPlanner.cpp)
    add_executable(SampleTimedCartesianPlanner src/SampleTimedCartesianPlanner.cpp)
    add_executable(SampleSimpleMotion src/SampleSimpleMotion.cpp)
    add_executable(MinimalSimpleMotion src/MinimalSimpleMotion.cpp)
    
    # Specify libraries to link a library or executable target against
    target_link_libraries(SampleConstraintPlanner ${catkin_LIBRARIES})
    target_link_libraries(SampleTimedCartesianPlanner ${catkin_LIBRARIES})
    target_link_libraries(SampleSimpleMotion ${catkin_LIBRARIES})
    target_link_libraries(MinimalSimpleMotion ${catkin_LIBRARIES})