]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
1 | # Copyright 2019 Mike Dev |
2 | # Distributed under the Boost Software License, Version 1.0. | |
3 | # See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt | |
4 | # | |
5 | # NOTE: CMake support for Boost.Container is currently experimental at best | |
6 | # and the interface is likely to change in the future | |
7 | ||
8 | cmake_minimum_required( VERSION 3.5 ) | |
9 | project( BoostContainer LANGUAGES C CXX ) | |
10 | ||
11 | file( GLOB boost_container_cpp_files src/*.cpp ) | |
12 | ||
13 | add_library(boost_container | |
14 | ${boost_container_cpp_files} | |
15 | src/alloc_lib.c | |
16 | ) | |
17 | ||
18 | # This is the public target name, other libraries should link to | |
19 | add_library( Boost::container ALIAS boost_container ) | |
20 | ||
21 | target_include_directories( boost_container PUBLIC include ) | |
22 | ||
23 | # NOTE: | |
24 | # We deactivate autolinking, because cmake based builds don't need it and | |
25 | # we don't implement name mangling for the library file anyway. | |
26 | # Ususally the parent CMakeLists.txt file should already have globally defined BOOST_ALL_NO_LIB | |
27 | target_compile_definitions( boost_container PUBLIC BOOST_CONTAINER_NO_LIB ) | |
28 | ||
29 | target_link_libraries( boost_container | |
30 | PUBLIC | |
31 | Boost::assert | |
32 | Boost::config | |
33 | Boost::container_hash | |
34 | Boost::core | |
35 | Boost::intrusive | |
36 | Boost::move | |
37 | Boost::static_assert | |
38 | Boost::type_traits | |
39 | ) |