diff --git a/CMakeLists.txt b/CMakeLists.txt index 627cc81..1dcb6c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,19 +11,13 @@ project(boost_static_assert VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CX add_library(boost_static_assert INTERFACE) add_library(Boost::static_assert ALIAS boost_static_assert) +target_include_directories(boost_static_assert INTERFACE include) + target_link_libraries(boost_static_assert INTERFACE Boost::config ) -# Automatic installation doesn't trigger because we have no include directory - -if(BOOST_SUPERPROJECT_VERSION AND NOT CMAKE_VERSION VERSION_LESS 3.13) - - boost_install(TARGETS boost_static_assert VERSION ${BOOST_SUPERPROJECT_VERSION}) - -endif() - # BUILD_TESTING is the standard CTest variable that enables testing if(BUILD_TESTING) diff --git a/include/boost/static_assert/detail/backward.hpp b/include/boost/static_assert/detail/backward.hpp new file mode 100644 index 0000000..cb75cf1 --- /dev/null +++ b/include/boost/static_assert/detail/backward.hpp @@ -0,0 +1,12 @@ +// Copyright 2025 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// +// This header is unused and is only present for backward compatibility. +// Without it, StaticAssert would be the only library without an include/ +// directory, and this breaks third-party installation scripts and logic. + +// Introduce an artificial dependency on Config, such that libraries that +// link to StaticAssert depend on the new location of boost/static_assert.hpp + +#include