summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Support/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index a32d238d287..26bbae03173 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -142,5 +142,13 @@ if( NOT MSVC )
endif()
endif( MINGW )
endif( NOT MSVC )
-target_link_libraries(LLVMSupport ${cmake_2_8_12_INTERFACE} ${system_libs})
+
+
+if(POLICY CMP0022 AND BUILD_SHARED_LIBS)
+ # FIXME: Should this be really PUBLIC?
+ target_link_libraries(LLVMSupport PUBLIC ${system_libs})
+else()
+ target_link_libraries(LLVMSupport ${cmake_2_8_12_INTERFACE} ${system_libs})
+endif()
+
set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")
OpenPOWER on IntegriCloud