Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)

project(ConcurrentQueue VERSION 1.1.0 LANGUAGES C CXX)

add_library(ConcurrentQueue INTERFACE)
target_include_directories(ConcurrentQueue INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/ConcurrentQueue>
)
target_compile_features(ConcurrentQueue INTERFACE
cxx_constexpr
cxx_defaulted_move_initializers
cxx_auto_type
)

add_library(ConcurrentQueue::ConcurrentQueue ALIAS ConcurrentQueue)

# Install and exports
include(GNUInstallDirs)

install(TARGETS ConcurrentQueue EXPORT ConcurrentQueueConfig)
install(
FILES
concurrentqueue.h
blockingconcurrentqueue.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ConcurrentQueue
)

install(EXPORT ConcurrentQueueConfig NAMESPACE ConcurrentQueue:: DESTINATION share/ConcurrentQueue/cmake)
export(TARGETS ConcurrentQueue NAMESPACE ConcurrentQueue:: FILE ConcurrentQueueConfig.cmake)

export(PACKAGE ConcurrentQueue)