Skip to content

Commit

Permalink
Fix LZMA compilation error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
white-axe committed Jan 3, 2025
1 parent cc52f2e commit ff6d72f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions subprojects/lzma.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
url = https://github.com/ShiftMediaProject/liblzma
revision = v5.6.3
depth = 1
diff_files = lzma.patch
13 changes: 13 additions & 0 deletions subprojects/packagefiles/lzma.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Fixes a compilation error when compiling liblzma in MSYS2.

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,7 +204,6 @@ if((MINGW OR CYGWIN) AND (
# in PACKAGE_NAME_DEFINITION works with gcc and clang too so we don't need
# to worry how to pass different flags to windres and the C compiler.
# Keep the original PACKAGE_NAME intact for generation of liblzma.pc.
- string(APPEND CMAKE_RC_FLAGS " --use-temp-file")
string(REPLACE " " "\\x20" PACKAGE_NAME_DEFINITION "${PACKAGE_NAME}")

# Use octal because "Program Files" would become \x20F.

0 comments on commit ff6d72f

Please sign in to comment.