This revision was automatically updated to reflect the committed changes.
Closed by commit rL248992: Add a Post-Build Event on Windows to copy the 
correct custom Python DLL to… (authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D13237?vs=35948&id=36197#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13237

Files:
  lldb/trunk/CMakeLists.txt

Index: lldb/trunk/CMakeLists.txt
===================================================================
--- lldb/trunk/CMakeLists.txt
+++ lldb/trunk/CMakeLists.txt
@@ -26,4 +26,17 @@
 
     # Ensure we do the python post-build step when building lldb.
     add_dependencies(lldb finish_swig)
+
+    # Add a Post-Build Event to copy the custom Python DLL to the lldb 
binaries dir so that Windows can find it when launching
+    # lldb.exe or any other executables that were linked with liblldb.
+    if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
+        # When using the Visual Studio CMake generator the lldb binaries end 
up in Release/bin, Debug/bin etc.
+        file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin" 
LLDB_BIN_DIR)
+        file(TO_NATIVE_PATH "${PYTHON_DLL}" PYTHON_DLL_NATIVE_PATH)
+        add_custom_command(
+            TARGET finish_swig
+            POST_BUILD
+            COMMAND "${CMAKE_COMMAND}" -E copy ${PYTHON_DLL_NATIVE_PATH} 
${LLDB_BIN_DIR}
+            COMMENT "Copying Python DLL to LLDB binaries directory.")
+    endif ()
 endif ()


Index: lldb/trunk/CMakeLists.txt
===================================================================
--- lldb/trunk/CMakeLists.txt
+++ lldb/trunk/CMakeLists.txt
@@ -26,4 +26,17 @@
 
     # Ensure we do the python post-build step when building lldb.
     add_dependencies(lldb finish_swig)
+
+    # Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
+    # lldb.exe or any other executables that were linked with liblldb.
+    if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
+        # When using the Visual Studio CMake generator the lldb binaries end up in Release/bin, Debug/bin etc.
+        file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin" LLDB_BIN_DIR)
+        file(TO_NATIVE_PATH "${PYTHON_DLL}" PYTHON_DLL_NATIVE_PATH)
+        add_custom_command(
+            TARGET finish_swig
+            POST_BUILD
+            COMMAND "${CMAKE_COMMAND}" -E copy ${PYTHON_DLL_NATIVE_PATH} ${LLDB_BIN_DIR}
+            COMMENT "Copying Python DLL to LLDB binaries directory.")
+    endif ()
 endif ()
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to