diff --git a/CMakeLists.txt b/CMakeLists.txt index 220dd67..3d1c6e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ project(video_to_rosbag) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() +if(CMAKE_BUILD_TYPE STREQUAL "Release") + add_link_options("-s") # or use CMAKE_EXE_LINKER_FLAGS_RELEASE +endif() find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED)