From 4546892d5b3b4ef0d6e906c55e4b898c4c6d965a Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Wed, 26 Jan 2022 17:46:49 -0800 Subject: [PATCH] Revert "Install headers to include\${PROJECT_NAME} (#351)" This reverts commit befc608e21c653404f2fd876986969286125a527. --- CMakeLists.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d351e9f..8a944fc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,7 +127,7 @@ add_library( target_include_directories(${PROJECT_NAME} PUBLIC "$" "$" - "$") + "$") # Causes the visibility macros to use dllexport rather than dllimport, # which is appropriate when building the dll but not consuming it. @@ -583,11 +583,13 @@ 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) @@ -595,17 +597,12 @@ if(BUILD_TESTING) 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)