Append missing version number to lldb binary built by cmake
- now, the output binary is called 'lldb-3.4' instead of 'lldb'
- a symlink 'lldb' -> 'lldb-3.4' is also created
- this fixes one of the problems preventing CMake from building Debian packages
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182148 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 33ecc0e..1217958 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,6 +147,11 @@
"`CMakeFiles'. Please delete them.")
endif()
+# Compute the LLDB version from the LLVM version.
+string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" LLDB_VERSION
+ ${PACKAGE_VERSION})
+message(STATUS "LLDB version: ${LLDB_VERSION}")
+
macro(add_lldb_library name)
llvm_process_sources(srcs ${ARGN})
if (MSVC_IDE OR XCODE)