From ecea4522cdbefc17530f6cce480fc4702bf94391 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 26 Feb 2014 11:58:11 +0000 Subject: [PATCH] [CMake] Work around to use target_link_libraries(PUBLIC) in BUILD_SHARED_LIBS mode. FIXME: It may be PRIVATE since SO knows its dependent libs. llvm-svn: 202261 --- llvm/cmake/modules/AddLLVM.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index b07634b0b658..a94c38629a85 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -314,6 +314,13 @@ function(llvm_add_library name) ${lib_deps} ${llvm_libs} ) + elseif(ARG_SHARED AND BUILD_SHARED_LIBS) + # FIXME: It may be PRIVATE since SO knows its dependent libs. + target_link_libraries(${name} PUBLIC + ${ARG_LINK_LIBS} + ${lib_deps} + ${llvm_libs} + ) else() # MODULE|SHARED target_link_libraries(${name} PRIVATE