From d481feda13f45e1f5a25b48d5b40a00d6569e021 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 23 Oct 2019 16:24:59 +0200 Subject: [PATCH] Fix for unsupported cmake feature --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dde5a51f3..f9c0469f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,7 +283,14 @@ endfunction() if(TARGET Boost::system) message(STATUS "Boost::boost exists") target_link_libraries(boost_headeronly INTERFACE Boost::boost) - list(TRANSFORM _boost_components PREPEND Boost:: OUTPUT_VARIABLE _boost_targets) + + # Only from cmake 3.12 + # list(TRANSFORM _boost_components PREPEND Boost:: OUTPUT_VARIABLE _boost_targets) + set(_boost_targets "") + foreach(comp ${_boost_components}) + list(APPEND _boost_targets "Boost::${comp}") + endforeach() + target_link_libraries(boost_libs INTERFACE boost_headeronly # includes the custom compile definitions as well ${_boost_targets}