Skip to content
Snippets Groups Projects
Commit c0bf70b5 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Fix CMAKE_CXX_FLAGS and link catkin library

parent 927a16ea
No related branches found
No related tags found
1 merge request!6Devel
...@@ -4,7 +4,7 @@ project(wolf_ros_imu) ...@@ -4,7 +4,7 @@ project(wolf_ros_imu)
## Compile as C++14 ## Compile as C++14
add_compile_options(-std=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 # -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 ## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
...@@ -52,11 +52,13 @@ add_library(publisher_${PROJECT_NAME} ...@@ -52,11 +52,13 @@ add_library(publisher_${PROJECT_NAME}
target_link_libraries(subscriber_${PROJECT_NAME} target_link_libraries(subscriber_${PROJECT_NAME}
wolfcore wolfcore
wolfimu wolfimu
${catkin_LIBRARIES}
${sensor_msgs_LIBRARIES} ${sensor_msgs_LIBRARIES}
) )
target_link_libraries(publisher_${PROJECT_NAME} target_link_libraries(publisher_${PROJECT_NAME}
wolfcore wolfcore
wolfimu wolfimu
${catkin_LIBRARIES}
${sensor_msgs_LIBRARIES} ${sensor_msgs_LIBRARIES}
) )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment