j7s-simple/CMakeLists.txt

28 lines
788 B
CMake

cmake_minimum_required(VERSION 3.8)
project(j7s-simple)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
add_executable(j7s-publisher src/j7s-publisher.cpp)
target_include_directories(j7s-publisher PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(j7s-publisher PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
ament_target_dependencies(j7s-publisher rclcpp std_msgs)
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)
install(TARGETS j7s-publisher
DESTINATION lib/${PROJECT_NAME})
ament_package()