summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/LLVM-Config.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/cmake/modules/LLVM-Config.cmake')
-rw-r--r--llvm/cmake/modules/LLVM-Config.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake
index 9cce1a2d4bc..10fd5260927 100644
--- a/llvm/cmake/modules/LLVM-Config.cmake
+++ b/llvm/cmake/modules/LLVM-Config.cmake
@@ -87,7 +87,7 @@ macro(llvm_config executable)
endif()
endif()
- target_link_libraries(${executable} LLVM)
+ target_link_libraries(${executable} PRIVATE LLVM)
endif()
explicit_llvm_config(${executable} ${link_components})
@@ -101,7 +101,7 @@ function(explicit_llvm_config executable)
get_target_property(t ${executable} TYPE)
if(t STREQUAL "STATIC_LIBRARY")
target_link_libraries(${executable} INTERFACE ${LIBRARIES})
- elseif(t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
+ elseif(t STREQUAL "EXECUTABLE" OR t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
target_link_libraries(${executable} PRIVATE ${LIBRARIES})
else()
# Use plain form for legacy user.
OpenPOWER on IntegriCloud