From 4ca51b9ace3e515da4cf3cece4b46df026e81fda Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 26 Feb 2014 12:18:55 +0000 Subject: [PATCH] [CMake] BUILD_SHARED_LIBS: Fixup for r202261: Give PULIC to system_libs in LLVMSupport. llvm-svn: 202263 --- llvm/lib/Support/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index a32d238d2877..26bbae031736 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}")