From 2e0d7a9337dd6775e83b7a22318d932e8ceec364 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202261 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index b07634b0b65..a94c38629a8 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/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