[Lldb-commits] [PATCH] D72286: installation: Accept separate install prefix for LLDB.framework

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 6 10:06:53 PST 2020


vsk updated this revision to Diff 236402.
vsk added a comment.

It looks like a framework-specific install prefix is required, as the install prefix for the framework is not always the same as the install prefix for the rest of the project.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72286/new/

https://reviews.llvm.org/D72286

Files:
  lldb/CMakeLists.txt
  lldb/cmake/modules/AddLLDB.cmake
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/cmake/modules/LLDBFramework.cmake
  lldb/source/API/CMakeLists.txt


Index: lldb/source/API/CMakeLists.txt
===================================================================
--- lldb/source/API/CMakeLists.txt
+++ lldb/source/API/CMakeLists.txt
@@ -15,7 +15,7 @@
 endif()
 
 if(LLDB_BUILD_FRAMEWORK)
-  set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR})
+  set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_PATH})
   set(option_framework FRAMEWORK)
 endif()
 
Index: lldb/cmake/modules/LLDBFramework.cmake
===================================================================
--- lldb/cmake/modules/LLDBFramework.cmake
+++ lldb/cmake/modules/LLDBFramework.cmake
@@ -1,5 +1,5 @@
 message(STATUS "LLDB.framework: build path is '${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}'")
-message(STATUS "LLDB.framework: install path is '${LLDB_FRAMEWORK_INSTALL_DIR}'")
+message(STATUS "LLDB.framework: install path is '${LLDB_FRAMEWORK_INSTALL_PATH}'")
 message(STATUS "LLDB.framework: resources subdirectory is 'Versions/${LLDB_FRAMEWORK_VERSION}/Resources'")
 
 # Configure liblldb as a framework bundle
@@ -27,7 +27,7 @@
   LIBRARY_DIR ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
 )
 
-lldb_add_post_install_steps_darwin(liblldb ${LLDB_FRAMEWORK_INSTALL_DIR})
+lldb_add_post_install_steps_darwin(liblldb ${LLDB_FRAMEWORK_INSTALL_PATH})
 
 # Affects the layout of the framework bundle (default is macOS layout).
 if(IOS)
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -90,7 +90,9 @@
 
   set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default is A)")
   set(LLDB_FRAMEWORK_BUILD_DIR bin CACHE STRING "Output directory for LLDB.framework")
+  set(LLDB_FRAMEWORK_INSTALL_PREFIX "" CACHE STRING "Prefix for the LLDB.framework install directory")
   set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Install directory for LLDB.framework")
+  set(LLDB_FRAMEWORK_INSTALL_PATH "${LLDB_FRAMEWORK_INSTALL_PREFIX}${LLDB_FRAMEWORK_INSTALL_DIR}")
 
   get_filename_component(LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR ${LLDB_FRAMEWORK_BUILD_DIR} ABSOLUTE
     BASE_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
Index: lldb/cmake/modules/AddLLDB.cmake
===================================================================
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -218,7 +218,7 @@
     set(subdir LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources)
     add_lldb_executable(${name}
       GENERATE_INSTALL
-      INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR}/${subdir}
+      INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_PATH}/${subdir}
       ${ARG_UNPARSED_ARGUMENTS}
     )
     lldb_add_to_buildtree_lldb_framework(${name} ${subdir})
Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -221,7 +221,7 @@
 
   # Install the LLDB python module
   if(LLDB_BUILD_FRAMEWORK)
-    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_PATH}/LLDB.framework/Resources/Python)
   else()
     set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72286.236402.patch
Type: text/x-patch
Size: 3282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200106/b5f9e617/attachment.bin>


More information about the lldb-commits mailing list