[CMake] Use LINK_LIBS instead of target_link_libraries().
llvm-svn: 202238
diff --git a/llvm/lib/LineEditor/CMakeLists.txt b/llvm/lib/LineEditor/CMakeLists.txt
index cef36a4..0dec256 100644
--- a/llvm/lib/LineEditor/CMakeLists.txt
+++ b/llvm/lib/LineEditor/CMakeLists.txt
@@ -1,7 +1,11 @@
+if(HAVE_LIBEDIT)
+ set(link_libs edit)
+endif()
+
add_llvm_library(LLVMLineEditor
LineEditor.cpp
- )
-if(HAVE_LIBEDIT)
- target_link_libraries(LLVMLineEditor edit)
-endif()
+ LINK_LIBS
+ LLVMSupport
+ ${link_libs}
+)