aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/driver/CMakeLists.txt')
-rw-r--r--tools/driver/CMakeLists.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
index 73f065d4357d..6384d5a92c2c 100644
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -1,8 +1,25 @@
include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
+if ((CMAKE_SYSTEM_NAME MATCHES "Windows") OR
+ (CMAKE_SYSTEM_NAME MATCHES "NetBSD" ))
+ # These targets do not have getopt support, so they rely on the one provided by
+ # liblldb. However, getopt is not a part of the liblldb interface, so we have
+ # to link against the constituent libraries manually. Note that this is
+ # extremely scary as it introduces ODR violations, and it should go away as
+ # soon as possible.
+ set(host_lib lldbHost)
+endif()
+
add_lldb_tool(lldb
Driver.cpp
Platform.cpp
+
+ LINK_LIBS
+ liblldb
+ ${host_lib}
+
+ LINK_COMPONENTS
+ Support
)
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
@@ -18,17 +35,3 @@ endif()
if ( LLDB_CAN_USE_DEBUGSERVER )
add_dependencies(lldb debugserver)
endif()
-
-target_link_libraries(lldb liblldb)
-if ((CMAKE_SYSTEM_NAME MATCHES "Windows") OR
- (CMAKE_SYSTEM_NAME MATCHES "NetBSD" ))
- # These targets do not have getopt support, so they rely on the one provided by
- # liblldb. However, getopt is not a part of the liblldb interface, so we have
- # to link against the constituent libraries manually. Note that this is
- # extremely scary as it introduces ODR violations, and it should go away as
- # soon as possible.
- target_link_libraries(lldb ${LLDB_USED_LIBS})
-endif()
-
-set_target_properties(lldb PROPERTIES VERSION ${LLDB_VERSION})
-