From c0bf70b5abb33d0febce66b4527cd000319ac019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Tue, 27 Sep 2022 12:53:44 +0200 Subject: [PATCH] Fix CMAKE_CXX_FLAGS and link catkin library --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a00252..2c71f48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(wolf_ros_imu) ## Compile as C++14 add_compile_options(-std=c++14) # -fPIC and -rdynamic ensure unique singleton instance across shared libraries (for factories) see: https://stackoverflow.com/a/8626922 -SET(CMAKE_CXX_FLAGS "-fPIC -rdynamic") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -rdynamic") ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) @@ -52,11 +52,13 @@ add_library(publisher_${PROJECT_NAME} target_link_libraries(subscriber_${PROJECT_NAME} wolfcore wolfimu + ${catkin_LIBRARIES} ${sensor_msgs_LIBRARIES} ) target_link_libraries(publisher_${PROJECT_NAME} wolfcore wolfimu + ${catkin_LIBRARIES} ${sensor_msgs_LIBRARIES} ) \ No newline at end of file -- GitLab