From 2469914a6ec4c320d436c59368d4b680b94b2dbb Mon Sep 17 00:00:00 2001 From: Agustin Alba Chicar Date: Tue, 24 Nov 2020 17:58:36 -0300 Subject: [PATCH] Uses namespaces in cmake targets. (#19) * Uses namespaces in cmake targets. - Uses "maliput_dragway::" for targets. - Uses "maliput_dragway_" for library file name prefix. * Reverts dragway python binding library name. --- src/bindings/CMakeLists.txt | 5 ++++- src/maliput_dragway/CMakeLists.txt | 7 +++++++ src/maliput_dragway_test_utilities/CMakeLists.txt | 4 +++- test/CMakeLists.txt | 6 +++--- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt index 0b95a2b..8e4b0f4 100644 --- a/src/bindings/CMakeLists.txt +++ b/src/bindings/CMakeLists.txt @@ -12,7 +12,10 @@ target_include_directories(dragway_py ) target_link_libraries(dragway_py - PRIVATE maliput_dragway maliput::api pybind11::module + PRIVATE + maliput::api + maliput_dragway::maliput_dragway + pybind11::module ) ############################################################################## diff --git a/src/maliput_dragway/CMakeLists.txt b/src/maliput_dragway/CMakeLists.txt index 1480421..4c8ceec 100644 --- a/src/maliput_dragway/CMakeLists.txt +++ b/src/maliput_dragway/CMakeLists.txt @@ -11,6 +11,13 @@ set(SOURCES add_library(maliput_dragway ${SOURCES}) +add_library(maliput_dragway::maliput_dragway ALIAS maliput_dragway) + +set_target_properties(maliput_dragway + PROPERTIES + OUTPUT_NAME maliput_dragway +) + target_include_directories(maliput_dragway PUBLIC $ diff --git a/src/maliput_dragway_test_utilities/CMakeLists.txt b/src/maliput_dragway_test_utilities/CMakeLists.txt index fad11c6..aeb23bb 100644 --- a/src/maliput_dragway_test_utilities/CMakeLists.txt +++ b/src/maliput_dragway_test_utilities/CMakeLists.txt @@ -3,6 +3,8 @@ set(TEST_UTILS_SOURCES add_library(maliput_dragway_test_utilities ${TEST_UTILS_SOURCES}) +add_library(maliput_dragway::test_utilities ALIAS maliput_dragway_test_utilities) + target_include_directories( maliput_dragway_test_utilities PUBLIC @@ -17,7 +19,7 @@ ament_target_dependencies(maliput_dragway_test_utilities target_link_libraries(maliput_dragway_test_utilities maliput::api - maliput_dragway + maliput_dragway::maliput_dragway ) install( diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 53b03c1..ca5fb5b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,9 +16,9 @@ macro(add_dependencies_to_test target) ) target_link_libraries(${target} - maliput_dragway - maliput::test_utilities) - + maliput::test_utilities + maliput_dragway::maliput_dragway + ) endif() endmacro()