Skip to content

Commit

Permalink
Revert "Install headers to include\${PROJECT_NAME} (ros2#351)"
Browse files Browse the repository at this point in the history
This reverts commit befc608.
  • Loading branch information
sloretz authored and pablogs9 committed Mar 29, 2022
1 parent c1303db commit 4546892
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ add_library(
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
"$<INSTALL_INTERFACE:include>")

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
Expand Down Expand Up @@ -583,29 +583,26 @@ if(BUILD_TESTING)
add_performance_test(benchmark_logging test/benchmark/benchmark_logging.cpp)
if(TARGET benchmark_logging)
target_link_libraries(benchmark_logging ${PROJECT_NAME})
target_include_directories(benchmark_logging PUBLIC include)
endif()

add_performance_test(benchmark_err_handle test/benchmark/benchmark_error_handling.cpp)
if(TARGET benchmark_err_handle)
target_link_libraries(benchmark_err_handle ${PROJECT_NAME})
target_include_directories(benchmark_err_handle PUBLIC include)
endif()

if(TARGET test_macros)
target_link_libraries(test_macros ${PROJECT_NAME})
endif()
endif()

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

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

ament_export_dependencies(ament_cmake)

ament_package()

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

0 comments on commit 4546892

Please sign in to comment.