Skip to content

Commit

Permalink
Revert shared_queue_vendor package deletion
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Orlov <[email protected]>
  • Loading branch information
MichaelOrlov committed Dec 2, 2024
1 parent 63ccb5e commit 4244ad1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
rosbag2_test_common
rosbag2_tests
rosbag2_transport
shared_queues_vendor
ament_lint_cpp: # Linters applicable to C++ packages
name: ament_${{ matrix.linter }}
Expand Down Expand Up @@ -61,6 +62,7 @@ jobs:
rosbag2_test_common
rosbag2_tests
rosbag2_transport
shared_queues_vendor
ament_lint_clang_format: # Linters applicable to C++ packages formatted with clang-format
name: ament_${{ matrix.linter }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
"rosbag2_test_msgdefs",
"rosbag2_tests",
"rosbag2_transport",
"shared_queues_vendor",
"sqlite3_vendor",
"zstd_vendor"
]
Expand All @@ -73,6 +74,7 @@ jobs:
"rosbag2_test_msgdefs",
"rosbag2_tests",
"rosbag2_transport",
"shared_queues_vendor",
"sqlite3_vendor",
"zstd_vendor"
]
Expand Down
44 changes: 44 additions & 0 deletions shared_queues_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.5)
project(shared_queues_vendor)

find_package(ament_cmake REQUIRED)

# Avoid DOWNLOAD_EXTRACT_TIMESTAMP warning for CMake >= 3.24
if (POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()

include(ExternalProject)
# Single producer single consumer queue by moodycamel - header only, don't build, install
ExternalProject_Add(ext-singleproducerconsumer
PREFIX singleproducerconsumer
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download
URL https://github.com/cameron314/readerwriterqueue/archive/ef7dfbf553288064347d51b8ac335f1ca489032a.zip
URL_MD5 64c673dd381b8fae9254053ad7b2be4d
TIMEOUT 60
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)

add_library(singleproducerconsumer INTERFACE)
target_include_directories(singleproducerconsumer INTERFACE $<INSTALL_INTERFACE:include/moodycamel>)

install(
TARGETS singleproducerconsumer
EXPORT export_${PROJECT_NAME}
INCLUDES DESTINATION include
)

# Install headers
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/singleproducerconsumer/src/ext-singleproducerconsumer/atomicops.h"
"${CMAKE_CURRENT_BINARY_DIR}/singleproducerconsumer/src/ext-singleproducerconsumer/readerwriterqueue.h"
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/moodycamel
)

ament_export_include_directories(include)
ament_export_targets(export_${PROJECT_NAME})
ament_package()

0 comments on commit 4244ad1

Please sign in to comment.