mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix missing zstd include/link deps in Common and basis_universal
Common and basis_universal call zstd functions directly but never declared the dependency after being split into their own CMakeLists.txt files, relying on directory-scope include_directories() that no longer reached them. Worked on Linux via system zstd.h, but broke the Android NDK build which has no such fallback. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XMv4XdM5dThs9Avr5FPXRv
This commit is contained in:
1 parent
bb6164e799
commit
e8f85f7804
2 files changed
+16
No files matched your search
@@ -382,6 +382,14 @@ endif()
|
||||
|
||||
target_link_libraries(Common ${LIBZIP_LIBRARY} 7zip ${PNG_LIBRARIES} basis_universal ${ZLIB_LIBRARY} pugixml vma gason udis86 ${RT_LIB} ${ATOMIC_LIB})
|
||||
|
||||
# ZIMLoad.cpp/ZIMSave.cpp, Serializer.cpp, and Render/TextureAtlas.cpp call directly into zstd.
|
||||
if(USE_SYSTEM_ZSTD)
|
||||
target_include_directories(Common PRIVATE ${ZSTD_INCLUDE_DIR})
|
||||
target_link_libraries(Common ${ZSTD_LIBRARY})
|
||||
else()
|
||||
target_link_libraries(Common libzstd_static)
|
||||
endif()
|
||||
|
||||
# Common/GPU/ShaderTranslation.cpp and Common/GPU/Vulkan/VulkanContext.cpp call directly into
|
||||
# glslang/spirv-cross, so Common needs to declare this dependency itself rather than relying on
|
||||
# some downstream consumer happening to also link it (that was the previous, fragile setup: this
|
||||
|
||||
@@ -18,3 +18,11 @@ add_library(basis_universal STATIC
|
||||
basisu_transcoder_tables_pvrtc2_alpha_33.inc
|
||||
basisu_transcoder_uastc.h
|
||||
)
|
||||
|
||||
# basisu_transcoder.cpp calls ZSTD_decompress()/ZSTD_isError() directly for KTX2 supercompression.
|
||||
if(USE_SYSTEM_ZSTD)
|
||||
target_include_directories(basis_universal PRIVATE ${ZSTD_INCLUDE_DIR})
|
||||
target_link_libraries(basis_universal ${ZSTD_LIBRARY})
|
||||
else()
|
||||
target_link_libraries(basis_universal libzstd_static)
|
||||
endif()
|
||||
Reference in new issue
Block a user