@@ -137,18 +137,30 @@ source_group("" FILES "include/boost/rts.hpp" "build/Jamfile")
137137source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/rts PREFIX "include" FILES ${BOOST_RTS_HEADERS} )
138138source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src PREFIX "src" FILES ${BOOST_RTS_SOURCES} )
139139
140+ function (boost_rts_setup_properties target )
141+ target_compile_features (${target} PUBLIC cxx_constexpr )
142+ target_include_directories (${target} PUBLIC "${PROJECT_SOURCE_DIR} /include" )
143+ target_link_libraries (${target} PUBLIC ${BOOST_RTS_DEPENDENCIES} )
144+ target_compile_definitions (${target} PUBLIC BOOST_RTS_NO_LIB )
145+ target_compile_definitions (${target} PRIVATE BOOST_RTS_SOURCE )
146+ if (BUILD_SHARED_LIBS )
147+ target_compile_definitions (${target} PUBLIC BOOST_RTS_DYN_LINK )
148+ else ()
149+ target_compile_definitions (${target} PUBLIC BOOST_RTS_STATIC_LINK )
150+ endif ()
151+ endfunction ()
152+
153+ if (BOOST_RTS_MRDOCS_BUILD)
154+ file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" "#include <boost/rts.hpp>\n " )
155+ add_library (boost_rts_mrdocs "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" )
156+ boost_rts_setup_properties (boost_rts_mrdocs )
157+ boost_rts_setup_properties (boost_rts_mrdocs PUBLIC BOOST_RTS_MRDOCS )
158+ return ()
159+ endif ()
160+
140161add_library (boost_rts include /boost/rts.hpp build /Jamfile ${BOOST_RTS_HEADERS} ${BOOST_RTS_SOURCES} )
141162add_library (Boost::rts ALIAS boost_rts )
142- target_compile_features (boost_rts PUBLIC cxx_constexpr )
143- target_include_directories (boost_rts PUBLIC "${PROJECT_SOURCE_DIR} /include" )
144- target_link_libraries (boost_rts PUBLIC ${BOOST_RTS_DEPENDENCIES} )
145- target_compile_definitions (boost_rts PUBLIC BOOST_RTS_NO_LIB )
146- target_compile_definitions (boost_rts PRIVATE BOOST_RTS_SOURCE )
147- if (BUILD_SHARED_LIBS )
148- target_compile_definitions (boost_rts PUBLIC BOOST_RTS_DYN_LINK )
149- else ()
150- target_compile_definitions (boost_rts PUBLIC BOOST_RTS_STATIC_LINK )
151- endif ()
163+ boost_rts_setup_properties (boost_rts )
152164
153165# Zlib
154166find_package (ZLIB )
0 commit comments