CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. cmake_minimum_required( VERSION 3.5 )
  8. project( BoostContainer LANGUAGES C CXX )
  9. file( GLOB boost_container_cpp_files src/*.cpp )
  10. add_library(boost_container
  11. ${boost_container_cpp_files}
  12. src/alloc_lib.c
  13. )
  14. # This is the public target name, other libraries should link to
  15. add_library( Boost::container ALIAS boost_container )
  16. target_include_directories( boost_container PUBLIC include )
  17. # NOTE:
  18. # We deactivate autolinking, because cmake based builds don't need it and
  19. # we don't implement name mangling for the library file anyway.
  20. # Ususally the parent CMakeLists.txt file should already have globally defined BOOST_ALL_NO_LIB
  21. target_compile_definitions( boost_container PUBLIC BOOST_CONTAINER_NO_LIB )
  22. target_link_libraries( boost_container
  23. PUBLIC
  24. Boost::assert
  25. Boost::config
  26. Boost::container_hash
  27. Boost::core
  28. Boost::intrusive
  29. Boost::move
  30. Boost::static_assert
  31. Boost::type_traits
  32. )