update
This commit is contained in:
parent
0344c31e5b
commit
a28f05c6d5
|
|
@ -16,7 +16,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
|
||||||
# --- Dependencies ---
|
# --- Dependencies ---
|
||||||
# Tìm các thư viện cần thiết
|
# Tìm các thư viện cần thiết
|
||||||
# find_package(tf3 REQUIRED) # Nếu dùng tf3
|
# find_package(tf3 REQUIRED) # Nếu dùng tf3
|
||||||
find_package(Eigen3 REQUIRED) # Thư viện Eigen cho toán học
|
find_package(Eigen3 REQUIRED) # Thư viện Eigen cho toán học
|
||||||
find_package(Boost REQUIRED COMPONENTS system thread filesystem) # Boost: system, thread, filesystem
|
find_package(Boost REQUIRED COMPONENTS system thread filesystem) # Boost: system, thread, filesystem
|
||||||
find_package(GTest REQUIRED) # Google Test cho unit test
|
find_package(GTest REQUIRED) # Google Test cho unit test
|
||||||
|
|
@ -122,6 +122,7 @@ add_library(plugins
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(plugins
|
target_link_libraries(plugins
|
||||||
|
PRIVATE
|
||||||
costmap_2d
|
costmap_2d
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
yaml-cpp
|
yaml-cpp
|
||||||
|
|
@ -133,6 +134,21 @@ set_target_properties(plugins PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(TARGETS plugins
|
||||||
|
EXPORT plugins-targets
|
||||||
|
ARCHIVE DESTINATION lib # Thư viện tĩnh .a
|
||||||
|
LIBRARY DESTINATION lib # Thư viện động .so
|
||||||
|
RUNTIME DESTINATION bin # File thực thi (nếu có)
|
||||||
|
INCLUDES DESTINATION include # Cài đặt include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(EXPORT plugins-targets
|
||||||
|
FILE plugins-targets.cmake
|
||||||
|
NAMESPACE costmap_2d::
|
||||||
|
DESTINATION lib/cmake/plugins
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# --- Option để bật/tắt test ---
|
# --- Option để bật/tắt test ---
|
||||||
option(BUILD_COSTMAP_TESTS "Build costmap_2d test executables" ON)
|
option(BUILD_COSTMAP_TESTS "Build costmap_2d test executables" ON)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user