Fix for cmake > 3.11

This commit is contained in:
Simon Giraudot 2020-05-18 13:40:31 +02:00
parent 7253f16801
commit 5a95259849
1 changed files with 10 additions and 3 deletions

View File

@ -31,7 +31,14 @@ if(Boost_IOSTREAMS_FOUND AND NOT TARGET CGAL::Boost_iostreams_support)
endif()
add_library(CGAL::Boost_iostreams_support INTERFACE IMPORTED)
set_target_properties(CGAL::Boost_iostreams_support PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_BOOST_IOSTREAMS"
INTERFACE_LINK_LIBRARIES "${Boost_LIB};${ZLIB_LIBS}")
if(CMAKE_VERSION VERSION_LESS 3.11)
set_target_properties(CGAL::Boost_iostreams_support PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_BOOST_IOSTREAMS"
INTERFACE_LINK_LIBRARIES "${Boost_LIB};${ZLIB_LIBS}")
else()
set_target_properties(CGAL::Boost_iostreams_support PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_BOOST_IOSTREAMS")
target_link_libraries(CGAL::Boost_iostreams_support INTERFACE "${Boost_LIB};${ZLIB_LIBS}")
endif()
endif()