Skip to content

Commit

Permalink
Uses namespaces in cmake targets. (#19)
Browse files Browse the repository at this point in the history
* Uses namespaces in cmake targets.

- Uses "maliput_dragway::" for targets.
- Uses "maliput_dragway_" for library file name prefix.

* Reverts dragway python binding library name.
  • Loading branch information
agalbachicar authored Nov 24, 2020
1 parent e259113 commit 2469914
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

##############################################################################
Expand Down
7 changes: 7 additions & 0 deletions src/maliput_dragway/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down
4 changes: 3 additions & 1 deletion src/maliput_dragway_test_utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 2469914

Please sign in to comment.