update
This commit is contained in:
parent
7f05ee86a0
commit
a471130273
|
|
@ -146,9 +146,9 @@ if (NOT TARGET move_base)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# C API for .NET/C# integration
|
# C API for .NET/C# integration
|
||||||
# if (NOT TARGET navigation_c_api)
|
if (NOT TARGET navigation_c_api)
|
||||||
# add_subdirectory(${CMAKE_SOURCE_DIR}/src/APIs/c_api)
|
add_subdirectory(${CMAKE_SOURCE_DIR}/src/APIs/c_api)
|
||||||
# endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "========================================")
|
message(STATUS "========================================")
|
||||||
message(STATUS "All packages configured successfully")
|
message(STATUS "All packages configured successfully")
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,10 @@ target_include_directories(${PROJECT_NAME}
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${YAML_CPP_TARGET}
|
${YAML_CPP_TARGET}
|
||||||
|
robot_xmlrpcpp
|
||||||
|
robot_time
|
||||||
|
PRIVATE
|
||||||
|
dl # Required for dladdr() function used in plugin_loader_helper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if we're using static library and warn user
|
# Check if we're using static library and warn user
|
||||||
|
|
@ -186,29 +190,6 @@ if(YAML_CPP_TARGET MATCHES "\\.a$" OR YAML_CPP_TARGET MATCHES "libyaml-cpp\\.a")
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# console_bridge: use library variable if available, otherwise try target
|
|
||||||
if(console_bridge_LIBRARIES)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${console_bridge_LIBRARIES})
|
|
||||||
elseif(TARGET console_bridge::console_bridge)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC console_bridge::console_bridge)
|
|
||||||
else()
|
|
||||||
# Fallback: link directly
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC console_bridge)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(BUILDING_WITH_CATKIN)
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
|
||||||
PUBLIC
|
|
||||||
${catkin_LIBRARIES}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
# Standalone mode: link internal dependencies
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
|
||||||
PUBLIC
|
|
||||||
robot_xmlrpcpp
|
|
||||||
robot_time
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
## Add cmake target dependencies
|
## Add cmake target dependencies
|
||||||
if(BUILDING_WITH_CATKIN)
|
if(BUILDING_WITH_CATKIN)
|
||||||
|
|
@ -229,13 +210,14 @@ target_compile_definitions(${PROJECT_NAME}
|
||||||
# Installation (Standalone CMake only)
|
# Installation (Standalone CMake only)
|
||||||
# ========================================================
|
# ========================================================
|
||||||
|
|
||||||
if(NOT BUILDING_WITH_CATKIN)
|
# Export target trong mọi trường hợp để các target khác có thể export và phụ thuộc vào nó
|
||||||
install(TARGETS ${PROJECT_NAME}
|
install(TARGETS ${PROJECT_NAME}
|
||||||
EXPORT ${PROJECT_NAME}-targets
|
EXPORT ${PROJECT_NAME}-targets
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
RUNTIME DESTINATION bin)
|
RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
if(NOT BUILDING_WITH_CATKIN)
|
||||||
install(DIRECTORY include/
|
install(DIRECTORY include/
|
||||||
DESTINATION include
|
DESTINATION include
|
||||||
FILES_MATCHING PATTERN "*.h")
|
FILES_MATCHING PATTERN "*.h")
|
||||||
|
|
@ -259,6 +241,11 @@ if(NOT BUILDING_WITH_CATKIN)
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/robot_cppConfig.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/robot_cppConfig.cmake
|
||||||
DESTINATION lib/cmake/${PROJECT_NAME}
|
DESTINATION lib/cmake/${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
# Khi build với Catkin, vẫn cần export để các target khác có thể export
|
||||||
|
install(EXPORT ${PROJECT_NAME}-targets
|
||||||
|
# NAMESPACE robot::
|
||||||
|
DESTINATION lib/cmake/${PROJECT_NAME})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ========================================================
|
# ========================================================
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
# Find dependencies
|
# Find dependencies
|
||||||
find_package(console_bridge REQUIRED)
|
find_package(console_bridge REQUIRED)
|
||||||
find_package(Boost REQUIRED COMPONENTS system thread)
|
find_package(Boost REQUIRED COMPONENTS system thread)
|
||||||
find_package(robot_xmlrpcpp QUIET)
|
|
||||||
if(NOT robot_xmlrpcpp_FOUND)
|
|
||||||
# Try alternative package name
|
|
||||||
find_package(XmlRpcCpp QUIET)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
add_library(conversions src/conversions.cpp)
|
add_library(conversions src/conversions.cpp)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit bb14979b8a80b743a4dd41b43b5474d4c1a2fc3f
|
Subproject commit a93304418d9e20c841dd8bf0ea9c9755eb57601f
|
||||||
Loading…
Reference in New Issue
Block a user