Skip to content

Commit

Permalink
7-zip: Only build Windows sources for Windows.
Browse files Browse the repository at this point in the history
I've got no idea why these were here (it was in the initial PR without
any explanation) and can't make any sense of the upstream makefiles, but
it seems like the things in the Windows directory ought to only be built
for Windows. This fixes compilation errors with NDK r28.
  • Loading branch information
DanAlbert committed Oct 23, 2024
1 parent c8582b4 commit 205e95f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions ports/7zip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,6 @@ target_sources(7zip PRIVATE
CPP/Common/XzCrc64Reg.cpp
CPP/Common/Xxh64Reg.cpp

CPP/Windows/FileDir.cpp
CPP/Windows/FileFind.cpp
CPP/Windows/FileIO.cpp
CPP/Windows/FileName.cpp
CPP/Windows/PropVariant.cpp
CPP/Windows/PropVariantUtils.cpp
CPP/Windows/Synchronization.cpp
CPP/Windows/System.cpp
CPP/Windows/TimeUtils.cpp

CPP/7zip/Common/CreateCoder.cpp
CPP/7zip/Common/CWrappers.cpp
CPP/7zip/Common/InBuffer.cpp
Expand Down Expand Up @@ -302,6 +292,20 @@ target_sources(7zip PRIVATE
C/Util/LzmaLib/LzmaLib.def
)

if(WIN32)
target_sources(7zip PRIVATE
CPP/Windows/FileDir.cpp
CPP/Windows/FileFind.cpp
CPP/Windows/FileIO.cpp
CPP/Windows/FileName.cpp
CPP/Windows/PropVariant.cpp
CPP/Windows/PropVariantUtils.cpp
CPP/Windows/Synchronization.cpp
CPP/Windows/System.cpp
CPP/Windows/TimeUtils.cpp
)
endif()

# 7zCrcOpt
if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
Expand Down

0 comments on commit 205e95f

Please sign in to comment.