archrelease: copy trunk to community-any
[ArchLinux/community.git] / ppsspp / trunk / ppsspp-system-zstd.patch
blobf22c62cabc79ab501014aa5cb19c3b77ef47a9f9
1 diff '--color=auto' -rupN libretro-ppsspp.orig/CMakeLists.txt libretro-ppsspp/CMakeLists.txt
2 --- libretro-ppsspp.orig/CMakeLists.txt 2021-10-01 17:28:30.046655852 +0200
3 +++ libretro-ppsspp/CMakeLists.txt 2021-10-01 17:30:38.698699237 +0200
4 @@ -151,6 +151,7 @@ option(USE_MINIUPNPC "Build with miniUPn
5 option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
6 option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
7 option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
8 +option(USE_SYSTEM_ZSTD "Dynamically link against system zstd" ${USE_SYSTEM_ZSTD})
9 option(USE_SYSTEM_LIBSDL2 "Dynamically link against system SDL2" ON)
10 option(USE_SYSTEM_LIBPNG "Dynamically link against system libpng" ON)
11 option(USE_ASAN "Use address sanitizer" OFF)
12 @@ -1976,8 +1977,20 @@ if(ANDROID)
13 endif()
14 endif()
16 -set(CoreExtraLibs ${CoreExtraLibs} armips libzstd_static)
17 -include_directories(ext/zstd/lib)
18 +set(CoreExtraLibs ${CoreExtraLibs} armips)
20 +find_package(PkgConfig)
21 +if(PKG_CONFIG_FOUND)
22 + pkg_check_modules(ZSTD libzstd)
23 +endif()
24 +if(ZSTD_FOUND AND USE_SYSTEM_ZSTD)
25 + include_directories(${ZSTD_INCLUDE_DIRS})
26 + target_link_libraries(${CoreLibName} ${ZSTD_LIBRARIES})
27 +else()
28 + add_subdirectory(ext/zstd/build/cmake EXCLUDE_FROM_ALL)
29 + include_directories(ext/zstd/lib)
30 + set(CoreExtraLibs ${CoreExtraLibs} libzstd_static)
31 +endif()
33 # needed for VK_USE_PLATFORM_XCB_KHR only
34 #if(VULKAN AND NOT WIN32)
35 diff '--color=auto' -rupN libretro-ppsspp.orig/ext/CMakeLists.txt libretro-ppsspp/ext/CMakeLists.txt
36 --- libretro-ppsspp.orig/ext/CMakeLists.txt 2021-10-01 17:28:30.136664237 +0200
37 +++ libretro-ppsspp/ext/CMakeLists.txt 2021-10-01 17:30:45.282654341 +0200
38 @@ -22,4 +22,3 @@ add_subdirectory(SPIRV-Cross-build)
39 if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
40 add_subdirectory(discord-rpc-build)
41 endif()
42 -add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)