[CMake] Work around to use target_link_libraries(PUBLIC) in BUILD_SHARED_LIBS mode.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 11:58:11 +0000 (11:58 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 11:58:11 +0000 (11:58 +0000)
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

index b07634b..a94c386 100644 (file)
@@ -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