summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2016-05-26 04:35:35 +0000
committerSteven Wu <stevenwu@apple.com>2016-05-26 04:35:35 +0000
commitc1beab651a7017df8a179dd9ec3d278dc679c7c1 (patch)
tree73668ec0db8c801d7828f2221b65961bc2c65bd0 /cmake
parent4aac6f32a0210e6575e2db90d8c332823b235024 (diff)
Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"
This reverts r270723. This commit breaks greendragon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddLLVM.cmake19
1 files changed, 12 insertions, 7 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 573d8725106..06d26673e96 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -489,20 +489,25 @@ function(llvm_add_library name)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Link libs w/o keywords, assuming PUBLIC.
- set(library_type)
+ target_link_libraries(${name}
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
elseif(ARG_STATIC)
- set(library_type INTERFACE)
- elseif(APPLE)
- set(library_type PUBLIC)
+ target_link_libraries(${name} INTERFACE
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
else()
# We can use PRIVATE since SO knows its dependent libs.
- set(library_type PRIVATE)
- endif()
- target_link_libraries(${name} ${library_type}
+ target_link_libraries(${name} PRIVATE
${ARG_LINK_LIBS}
${lib_deps}
${llvm_libs}
)
+ endif()
if(LLVM_COMMON_DEPENDS)
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})