forked from boostorg/assert
Add CMake install support
This commit is contained in:
@@ -12,6 +12,8 @@ project(boost_assert VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
|||||||
add_library(boost_assert INTERFACE)
|
add_library(boost_assert INTERFACE)
|
||||||
add_library(Boost::assert ALIAS boost_assert)
|
add_library(Boost::assert ALIAS boost_assert)
|
||||||
|
|
||||||
|
set_property(TARGET boost_assert PROPERTY EXPORT_NAME assert)
|
||||||
|
|
||||||
target_include_directories(boost_assert
|
target_include_directories(boost_assert
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
@@ -23,6 +25,14 @@ target_link_libraries(boost_assert
|
|||||||
Boost::config
|
Boost::config
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(BoostInstall OPTIONAL RESULT_VARIABLE HAVE_BOOST_INSTALL)
|
||||||
|
|
||||||
|
if(HAVE_BOOST_INSTALL)
|
||||||
|
|
||||||
|
boost_install(boost_assert)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
Reference in New Issue
Block a user