cmake_minimum_required(VERSION 3.10)
project(geometry_msgs)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if (NOT TARGET std_msgs)
    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../std_msgs ${CMAKE_BINARY_DIR}/std_msgs_build)
endif()

# Thư viện header-only
add_library(geometry_msgs INTERFACE)

# Include path tới thư mục chứa file header
target_include_directories(geometry_msgs INTERFACE
  ${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Liên kết với std_msgs nếu bạn có file Header.h trong include/std_msgs/
target_link_libraries(geometry_msgs INTERFACE std_msgs)

add_executable(test_geometry test/main.cpp)
target_link_libraries(test_geometry PRIVATE geometry_msgs)
