X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=9037c89b42840c35a93bf25fb87b65979c28c377;hp=a27d1a6fd21edfec175b7b252cf2cbc89f95be24;hb=fad08c0bc53514b43fdf44e5a792a019b1414367;hpb=07c41b7cebcc87a313a5bfccd50a7949d126180a diff --git a/CMakeLists.txt b/CMakeLists.txt index a27d1a6f..9037c89b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -335,6 +335,14 @@ set_package_properties(Boost PROPERTIES TYPE REQUIRED URL "https://www.boost.org/" DESCRIPTION "Boost libraries for C++" ) +# Older versions don't define the imported target +if (NOT TARGET Boost::boost) + add_library(Boost::boost INTERFACE IMPORTED GLOBAL) + if (Boost_INCLUDE_DIRS) + set_target_properties(Boost::boost PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") + endif() +endif() find_package(ZLIB REQUIRED) set_package_properties(ZLIB PROPERTIES TYPE REQUIRED