From 092324e84ca8a95747d0ad6f221e42e4345c706f Mon Sep 17 00:00:00 2001 From: ivanpauno Date: Fri, 15 Mar 2019 17:02:15 -0300 Subject: [PATCH 1/3] Used ament_target_dependencies where possible --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66d0c7bb..f3e747b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,13 @@ set(${PROJECT_NAME}_SRCS src/multi_library_class_loader.cpp ) add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SRCS}) -target_include_directories(${PROJECT_NAME} - PUBLIC include ${console_bridge_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS}) -target_link_libraries(${PROJECT_NAME} ${console_bridge_LIBRARIES} ${Poco_LIBRARIES}) +if(ament_cmake_FOUND) + target_include_directories(${PROJECT_NAME} + PUBLIC include ${console_bridge_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS}) + target_link_libraries(${PROJECT_NAME} ${console_bridge_LIBRARIES} ${Poco_LIBRARIES}) +else() + ament_target_dependencies(${PROJECT_NAME} "console_bridge" "Poco") +endif() if(WIN32) # Causes the visibility macros to use dllexport rather than dllimport # which is appropriate when building the dll but not consuming it. From daaf740e1b432308b2f4443f6e842e8b863a1520 Mon Sep 17 00:00:00 2001 From: ivanpauno Date: Mon, 18 Mar 2019 17:03:45 -0300 Subject: [PATCH 2/3] Corrected with PR comment Signed-off-by: ivanpauno --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3e747b6..61eba162 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,11 +36,11 @@ set(${PROJECT_NAME}_SRCS ) add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SRCS}) if(ament_cmake_FOUND) + ament_target_dependencies(${PROJECT_NAME} "console_bridge" "Poco") +else() target_include_directories(${PROJECT_NAME} PUBLIC include ${console_bridge_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS}) target_link_libraries(${PROJECT_NAME} ${console_bridge_LIBRARIES} ${Poco_LIBRARIES}) -else() - ament_target_dependencies(${PROJECT_NAME} "console_bridge" "Poco") endif() if(WIN32) # Causes the visibility macros to use dllexport rather than dllimport From d8c25bf73d554ca3d5d25c4ce11b866d7b987516 Mon Sep 17 00:00:00 2001 From: ivanpauno Date: Mon, 18 Mar 2019 17:22:10 -0300 Subject: [PATCH 3/3] Adding class_loader include dir again Signed-off-by: ivanpauno --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61eba162..8075aed8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,8 @@ set(${PROJECT_NAME}_SRCS ) add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SRCS}) if(ament_cmake_FOUND) + target_include_directories(${PROJECT_NAME} + PUBLIC include) ament_target_dependencies(${PROJECT_NAME} "console_bridge" "Poco") else() target_include_directories(${PROJECT_NAME}