neurali:ros_cmakelists.txt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
neurali:ros_cmakelists.txt [2015/08/05 12:05] – profpro | neurali:ros_cmakelists.txt [2020/06/08 22:20] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CMakeLists.txt ====== | ||
+ | |||
+ | Tramite [[neurali: | ||
+ | |||
+ | Il file CMakeLists.txt descrive le impostazioni di compilazione, | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Anche in Python! http:// | ||
+ | ===== Struttura ===== | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | cmake_minimum_required(VERSION 2.8.3) | ||
+ | project(node_del_package) | ||
+ | find_package(catkin REQUIRED COMPONENTS package_dip) | ||
+ | find_package(catkin REQUIRED COMPONENTS | ||
+ | find_package(Boost REQUIRED COMPONENTS thread) #if you wanted to use Boost threads | ||
+ | find_package(Qt REQUIRED COMPONENTS QtXml) | ||
+ | |||
+ | catkin_package( | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | include_directories(< | ||
+ | include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) | ||
+ | # | ||
+ | |||
+ | add_executable(myProgram src/ | ||
+ | target_link_libraries(driver ${catkin_LIBRARIES}) # altre librerie da linkare. | ||
+ | |||
+ | # | ||
+ | target_link_libraries(myLib ${catkin_LIBRARIES}) | ||
+ | |||
+ | #output dir | ||
+ | set_target_properties(python_module_library | ||
+ | PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/ | ||
+ | |||
+ | | ||
+ | </ | ||
+ | |||
+ | * Required CMake Version (cmake_minimum_required) | ||
+ | * Package Name (project()) | ||
+ | * Find other CMake/ | ||
+ | * Message/ | ||
+ | * Invoke message/ | ||
+ | * Specify package build info export (catkin_package()) | ||
+ | * Libraries/ | ||
+ | * Tests to build (catkin_add_gtest()) | ||
+ | * Install rules (install()) |