diff --git a/CMakeLists.txt b/CMakeLists.txt index 407ab4d..d224372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,15 +8,11 @@ cmake_minimum_required(VERSION 3.5...3.16) project(boost_lockfree VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) option(BOOST_LOCKFREE_BUILD_TESTS "Build boost::lockfree tests" OFF) -option(BOOST_LOCKFREE_USE_FILE_SET "Use FILE_SET for boost::lockfree" OFF) - add_library(boost_lockfree INTERFACE) add_library(Boost::lockfree ALIAS boost_lockfree) -target_include_directories(boost_lockfree INTERFACE include) - -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23 AND BOOST_LOCKFREE_USE_FILE_SET) +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23) set(Headers include/boost/lockfree/spsc_queue.hpp include/boost/lockfree/policies.hpp @@ -33,7 +29,9 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.23 AND BOOST_LOCKFREE_USE_FILE_SET) include/boost/lockfree/stack.hpp ) - target_sources(boost_lockfree PUBLIC FILE_SET HEADERS FILES ${Headers} ) + target_sources(boost_lockfree PUBLIC FILE_SET HEADERS BASE_DIRS include FILES ${Headers} ) +else() + target_include_directories(boost_lockfree INTERFACE include) endif() target_link_libraries(boost_lockfree