Skip to content

Commit

Permalink
refactor: remove redundant cmake definition (#13)
Browse files Browse the repository at this point in the history
* remove redundant cmake definition

Signed-off-by: wep21 <daisuke.nishimatsu1021@gmail.com>

* style(pre-commit): autofix

---------

Signed-off-by: wep21 <daisuke.nishimatsu1021@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
  • Loading branch information
3 people authored Jul 2, 2024
1 parent 08afed3 commit 406a86a
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions autoware_lanelet2_extension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,6 @@ project(autoware_lanelet2_extension)
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(PkgConfig)
find_path(GeographicLib_INCLUDE_DIR GeographicLib/Config.h
PATH_SUFFIXES GeographicLib
)
set(GeographicLib_INCLUDE_DIRS ${GeographicLib_INCLUDE_DIR})

find_library(GeographicLib_LIBRARIES
NAMES Geographic
)

find_library(PUGIXML_LIBRARIES
NAMES pugixml
)

find_path(PUGIXML_INCLUDE_DIRS
NAMES pugixml.hpp
PATH_SUFFIXES pugixml
)

include_directories(
${GeographicLib_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIRS}
)

add_definitions(${GeographicLib_DEFINITIONS})

ament_auto_add_library(${PROJECT_NAME}_lib SHARED
lib/autoware_osm_parser.cpp
lib/autoware_traffic_light.cpp
Expand All @@ -49,34 +23,19 @@ ament_auto_add_library(${PROJECT_NAME}_lib SHARED
lib/visualization.cpp
lib/route_checker.cpp
)
target_link_libraries(${PROJECT_NAME}_lib
${GeographicLib_LIBRARIES}
)
get_target_property(lanelet2_core_INCLUDE_DIRECTORIES lanelet2_core::lanelet2_core INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(${PROJECT_NAME}_lib
SYSTEM PRIVATE
${lanelet2_core_INCLUDE_DIRECTORIES}
)

ament_auto_add_executable(${PROJECT_NAME}_sample src/sample_code.cpp)
add_dependencies(${PROJECT_NAME}_sample ${PROJECT_NAME}_lib)
target_link_libraries(${PROJECT_NAME}_sample
${PROJECT_NAME}_lib
)

ament_auto_add_executable(autoware_lanelet2_validation src/validation.cpp)
add_dependencies(autoware_lanelet2_validation ${PROJECT_NAME}_lib)
target_link_libraries(autoware_lanelet2_validation
${catkin_LIBRARIES}
${PUGIXML_LIBRARIES}
${PROJECT_NAME}_lib
)

ament_auto_add_executable(check_right_of_way src/check_right_of_way.cpp)
add_dependencies(check_right_of_way ${PROJECT_NAME}_lib)
target_link_libraries(check_right_of_way
${catkin_LIBRARIES}
${PUGIXML_LIBRARIES}
${PROJECT_NAME}_lib
)

Expand All @@ -91,10 +50,6 @@ if(BUILD_TESTING)
target_link_libraries(regulatory_elements-test ${PROJECT_NAME}_lib)
ament_add_ros_isolated_gtest(utilities-test test/src/test_utilities.cpp)
target_link_libraries(utilities-test ${PROJECT_NAME}_lib)
target_include_directories(utilities-test
SYSTEM PRIVATE
${lanelet2_core_INCLUDE_DIRECTORIES}
)
ament_add_ros_isolated_gtest(route-test test/src/test_route_checker.cpp)
target_link_libraries(route-test ${PROJECT_NAME}_lib)
endif()
Expand Down

0 comments on commit 406a86a

Please sign in to comment.