File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -140,11 +140,17 @@ endif ()
140140file (GLOB_RECURSE BOOST_OPENMETHOD_HEADERS CONFIGURE_DEPENDS include /boost/*.hpp)
141141set_property (GLOBAL PROPERTY USE_FOLDERS ON )
142142source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include /boost PREFIX "" FILES ${BOOST_OPENMETHOD_HEADERS} )
143+
143144function (boost_openmethod_setup_properties target )
144145 target_link_libraries (${target} INTERFACE ${BOOST_OPENMETHOD_DEPENDENCIES} )
145146endfunction ()
146147
147- add_library (boost_openmethod INTERFACE ${BOOST_OPENMETHOD_HEADERS} )
148+ add_library (boost_openmethod INTERFACE )
149+
150+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.19)
151+ target_sources (boost_openmethod PRIVATE ${BOOST_OPENMETHOD_HEADERS} )
152+ endif ()
153+
148154add_library (Boost::openmethod ALIAS boost_openmethod)
149155target_include_directories (boost_openmethod INTERFACE "${PROJECT_SOURCE_DIR} /include" )
150156boost_openmethod_setup_properties(boost_openmethod)
You can’t perform that action at this time.
0 commit comments