CMakeLists.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright Mike Dev 2018
  2. # Copyright Rene Rivera 2018
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # See accompanying file LICENSE_1_0.txt or copy at
  5. # http://www.boost.org/LICENSE_1_0.txt
  6. # NOTE:
  7. # CMake support for Boost.Predef is currently experimental at best and the
  8. # interface is likely to change in the future
  9. #
  10. # This file provides minimal cmake support (no unit-tests,
  11. # no installation) for integration into a "host" cmake project
  12. # via the "add_subdirectory( <path-to-boost-predef> )" command.
  13. #
  14. # Other cmake targets can then use the public target name
  15. # "Boost::predef" in order to express their dependency
  16. # on this library. I.e:
  17. #
  18. # target_link_libraries( <my-exe/lib> PUBLIC Boost::predef )
  19. # Only need the basic minimum of project, add_library, and
  20. # target_include_directories commands.
  21. cmake_minimum_required( VERSION 3.0 )
  22. # Don't set VERSION, as that's a pita to keep up to date with the version
  23. # header. And don't set LANGUAGES as we are multi-language and header
  24. # only, so it's irrelevant.
  25. project( BoostPredef )
  26. # Simple INTERFACE, and header only, library target.
  27. add_library( boost_predef INTERFACE )
  28. # The only usage requirement is include dir for consumers.
  29. target_include_directories( boost_predef INTERFACE include )
  30. # Add an alias to be compatible with consumers that may have used the
  31. # FindBoost script.
  32. add_library( Boost::predef ALIAS boost_predef )