Skip to content

Commit

Permalink
Revert "Install includes it include/${PROJECT_NAME} (ros2#959)"
Browse files Browse the repository at this point in the history
This reverts commit 0be33d2.
  • Loading branch information
sloretz authored and pablogs9 committed Jan 21, 2022
1 parent e83aa1a commit ccf0768
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 31 deletions.
10 changes: 4 additions & 6 deletions rcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ set(${PROJECT_NAME}_sources
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_sources})
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
"$<INSTALL_INTERFACE:include>")
# specific order: dependents before dependencies
ament_target_dependencies(${PROJECT_NAME}
"rcl_interfaces"
Expand Down Expand Up @@ -129,13 +129,11 @@ install(
# This is overwritten each loop, but which one it points to doesn't really matter.
set(rcl_lib_dir "$<TARGET_FILE_DIR:${PROJECT_NAME}>")

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
# Export modern CMake targets
ament_export_targets(${PROJECT_NAME})

# specific order: dependents before dependencies
ament_export_dependencies(ament_cmake)
ament_export_dependencies(rcl_interfaces)
ament_export_dependencies(rcl_logging_interface)
Expand Down Expand Up @@ -168,5 +166,5 @@ install(
)
install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
DESTINATION include
)
23 changes: 15 additions & 8 deletions rcl_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ add_library(${PROJECT_NAME}

target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
"$<INSTALL_INTERFACE:include>")

ament_target_dependencies(${PROJECT_NAME}
"action_msgs"
Expand All @@ -62,7 +62,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE "RCL_ACTION_BUILDING_DLL")

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
DESTINATION include
)

install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
Expand All @@ -85,6 +85,7 @@ if(BUILD_TESTING)
)
if(TARGET test_action_client)
target_include_directories(test_action_client PUBLIC
include
src
)
target_link_libraries(test_action_client
Expand Down Expand Up @@ -118,6 +119,9 @@ if(BUILD_TESTING)
PUBLIC "RMW_IMPLEMENTATION=${rmw_implementation}")
target_compile_definitions(${target}${target_suffix}
PUBLIC RCUTILS_ENABLE_FAULT_INJECTION)
target_include_directories(${target}${target_suffix} PUBLIC
include
)
target_link_libraries(${target}${target_suffix}
${PROJECT_NAME}
)
Expand Down Expand Up @@ -147,6 +151,7 @@ if(BUILD_TESTING)
)
if(TARGET test_action_server)
target_include_directories(test_action_server PUBLIC
include
src
)
target_link_libraries(test_action_server
Expand All @@ -163,6 +168,9 @@ if(BUILD_TESTING)
test/rcl_action/test_goal_handle.cpp
)
if(TARGET test_goal_handle)
target_include_directories(test_goal_handle PUBLIC
include
)
target_link_libraries(test_goal_handle
${PROJECT_NAME}
)
Expand All @@ -181,6 +189,9 @@ if(BUILD_TESTING)
test/rcl_action/test_types.cpp
)
if(TARGET test_types)
target_include_directories(test_types PUBLIC
include
)
target_link_libraries(test_types
${PROJECT_NAME}
)
Expand Down Expand Up @@ -213,14 +224,10 @@ if(BUILD_TESTING)
endif()
endif()

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})

# Export modern CMake targets
ament_export_targets(${PROJECT_NAME})

# specific order: dependents before dependencies
ament_export_dependencies(action_msgs)
ament_export_dependencies(ament_cmake)
ament_export_dependencies(rcl)
Expand Down
12 changes: 4 additions & 8 deletions rcl_lifecycle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ add_library(

target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
"$<INSTALL_INTERFACE:include>")

# specific order: dependents before dependencies
ament_target_dependencies(rcl_lifecycle
Expand Down Expand Up @@ -125,14 +125,10 @@ if(BUILD_TESTING)
endif()
endif()

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
# specific order: dependents before dependencies
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})

# Export modern CMake targets
ament_export_targets(${PROJECT_NAME})

# specific order: dependents before dependencies
ament_export_dependencies(ament_cmake)
ament_export_dependencies(lifecycle_msgs)
ament_export_dependencies(rcl)
Expand All @@ -143,4 +139,4 @@ ament_package()

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME})
DESTINATION include)
14 changes: 5 additions & 9 deletions rcl_yaml_param_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ add_library(
${rcl_yaml_parser_sources})
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
"$<INSTALL_INTERFACE:include>")
ament_target_dependencies(${PROJECT_NAME} "libyaml_vendor" "rcutils" "rmw")

# Set the visibility to hidden by default if possible
Expand Down Expand Up @@ -185,17 +185,13 @@ if(BUILD_TESTING)
endif()
endif()

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
ament_export_libraries(${PROJECT_NAME})

# Export modern CMake targets
ament_export_targets(${PROJECT_NAME})

ament_export_dependencies(ament_cmake libyaml_vendor)
ament_export_dependencies(rmw)
ament_export_include_directories(include)
install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
DESTINATION include
)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(${PROJECT_NAME})
ament_package()

0 comments on commit ccf0768

Please sign in to comment.