[Lldb-commits] [lldb] r290180 - [CMake] [PR31433] Fix LLDB tool installation

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 20 08:28:19 PST 2016


Author: cbieneman
Date: Tue Dec 20 10:28:18 2016
New Revision: 290180

URL: http://llvm.org/viewvc/llvm-project?rev=290180&view=rev
Log:
[CMake] [PR31433] Fix LLDB tool installation

This resolves PR 31433.

Modified:
    lldb/trunk/cmake/modules/AddLLDB.cmake

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=290180&r1=290179&r2=290180&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Tue Dec 20 10:28:18 2016
@@ -117,7 +117,6 @@ function(add_lldb_executable name)
   set_target_properties(${name} PROPERTIES
     FOLDER "lldb executables")
 
-  set(install_dir bin)
   if(LLDB_BUILD_FRAMEWORK)
     if(ARG_INCLUDE_IN_FRAMEWORK)
       string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR})
@@ -129,18 +128,19 @@ function(add_lldb_executable name)
       set_target_properties(${name} PROPERTIES
             BUILD_WITH_INSTALL_RPATH On
             INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}")
-      if(ARG_GENERATE_INSTALL)
-        install(TARGETS ${name}
-              COMPONENT ${name}
-              RUNTIME DESTINATION ${install_dir})
-        if (NOT CMAKE_CONFIGURATION_TYPES)
-          add_custom_target(install-${name}
-                            DEPENDS ${name}
-                            COMMAND "${CMAKE_COMMAND}"
-                                    -DCMAKE_INSTALL_COMPONENT=${name}
-                                    -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
-        endif()
-      endif()
+    endif()
+  endif()
+
+  if(ARG_GENERATE_INSTALL)
+    install(TARGETS ${name}
+          COMPONENT ${name}
+          RUNTIME DESTINATION bin)
+    if (NOT CMAKE_CONFIGURATION_TYPES)
+      add_custom_target(install-${name}
+                        DEPENDS ${name}
+                        COMMAND "${CMAKE_COMMAND}"
+                                -DCMAKE_INSTALL_COMPONENT=${name}
+                                -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
     endif()
   endif()
 




More information about the lldb-commits mailing list