[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
This commit is contained in:
NAKAMURA Takumi 2014-02-26 11:58:11 +00:00
parent a39b612918
commit ecea4522cd
1 changed files with 7 additions and 0 deletions

View 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