Skip to content

Commit

Permalink
Remove gdal geographiclib dependencies
Browse files Browse the repository at this point in the history
This commit removes unnecessary dependencies to gdal and geomgraphic lib from the terrain_planner package
  • Loading branch information
Jaeyoung-Lim committed Oct 30, 2023
1 parent 0e6aa07 commit 91c785c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
5 changes: 2 additions & 3 deletions terrain_navigation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ include_directories(
include
${Boost_INCLUDE_DIR}
${Eigen_INCLUDE_DIRS}
${GeographicLib_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME}
Expand All @@ -27,7 +26,7 @@ add_library(${PROJECT_NAME}
src/terrain_map.cpp
)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${GeographicLib_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})

if(CATKIN_ENABLE_TESTING)
# Add gtest based cpp test target and link libraries
Expand All @@ -38,7 +37,7 @@ if(CATKIN_ENABLE_TESTING)
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}
${catkin_LIBRARIES}
${YAML_CPP_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES})
${YAML_CPP_LIBRARIES} ${OpenCV_LIBRARIES})
endif()

endif()
4 changes: 3 additions & 1 deletion terrain_navigation_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
cmake_minimum_required(VERSION 2.8.12)
project(terrain_navigation_ros)
add_definitions(-std=c++17)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

find_package(ompl REQUIRED)
find_package(catkin REQUIRED dynamic_reconfigure)
generate_dynamic_reconfigure_options(
cfg/HeightRateTuning.cfg
)
find_package(Boost REQUIRED COMPONENTS serialization system filesystem)

find_package(GeographicLib REQUIRED)
include(CheckGeographicLibDatasets)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down
25 changes: 9 additions & 16 deletions terrain_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ cmake_minimum_required(VERSION 2.8.12)
project(terrain_planner)

add_definitions(-std=c++17 -Wall)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

find_package(GDAL)
find_package(OpenCV REQUIRED)
find_package(GeographicLib REQUIRED)
find_package(ompl REQUIRED)
find_package(Boost REQUIRED COMPONENTS serialization system filesystem)
include(CheckGeographicLibDatasets)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand All @@ -28,7 +24,6 @@ catkin_package(
INCLUDE_DIRS include
LIBRARIES terrain_planner
CATKIN_DEPENDS roscpp rospy
DEPENDS GeographicLib
)

#############
Expand All @@ -39,8 +34,6 @@ include_directories(
${Boost_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${GDAL_INCLUDE_DIRS}
${GeographicLib_INCLUDE_DIRS}
${OMPL_INCLUDE_DIR}
)

Expand All @@ -51,29 +44,29 @@ add_library(${PROJECT_NAME}
src/DubinsPath.cpp
src/DubinsAirplane.cpp
)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${GDAL_LIBRARY} ${Boost_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES} ${GeographicLib_LIBRARIES} ${OMPL_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${Boost_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES} ${Boost_LIBRARIES})

############
# BINARIES #
############
add_executable(test_rrt_node
src/test_rrt_node.cpp
)
add_dependencies(test_rrt_node ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${GDAL_LIBRARY})
target_link_libraries(test_rrt_node ${PROJECT_NAME} ${catkin_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})
add_dependencies(test_rrt_node ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(test_rrt_node ${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})

add_executable(test_ompl_dubins
src/test_ompl_dubins.cpp
)
add_dependencies(test_ompl_dubins ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${GDAL_LIBRARY})
target_link_libraries(test_ompl_dubins ${PROJECT_NAME} ${catkin_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})
add_dependencies(test_ompl_dubins ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(test_ompl_dubins ${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})

add_executable(test_ompl_dubins_to_circle
src/test_ompl_dubins_to_circle.cpp
)
add_dependencies(test_ompl_dubins_to_circle ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${GDAL_LIBRARY})
target_link_libraries(test_ompl_dubins_to_circle ${PROJECT_NAME} ${catkin_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})
add_dependencies(test_ompl_dubins_to_circle ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(test_ompl_dubins_to_circle ${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})

##########
# EXPORT #
Expand All @@ -93,7 +86,7 @@ if(CATKIN_ENABLE_TESTING)
if(TARGET ${PROJECT_NAME}-test)
target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}
${catkin_LIBRARIES}
${YAML_CPP_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES})
${YAML_CPP_LIBRARIES} ${OpenCV_LIBRARIES})
endif()

endif()

0 comments on commit 91c785c

Please sign in to comment.