mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 04:05:40 +03:00
266 lines
9.4 KiB
Diff
266 lines
9.4 KiB
Diff
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
|
|
index 2dcbc33..64ba530 100644
|
|
--- a/dep/CMakeLists.txt
|
|
+++ b/dep/CMakeLists.txt
|
|
@@ -1,23 +1,12 @@
|
|
-add_subdirectory(fmt)
|
|
-add_subdirectory(gsl)
|
|
add_subdirectory(glad)
|
|
add_subdirectory(stb)
|
|
-add_subdirectory(zlib)
|
|
-add_subdirectory(zstd)
|
|
-add_subdirectory(minizip)
|
|
add_subdirectory(lzma)
|
|
add_subdirectory(libchdr)
|
|
-add_subdirectory(xxhash)
|
|
-add_subdirectory(rapidjson)
|
|
add_subdirectory(glslang)
|
|
add_subdirectory(imgui)
|
|
add_subdirectory(simpleini)
|
|
-add_subdirectory(vulkan)
|
|
-add_subdirectory(soundtouch)
|
|
-add_subdirectory(tinyxml2)
|
|
add_subdirectory(googletest)
|
|
add_subdirectory(cpuinfo)
|
|
-add_subdirectory(fast_float)
|
|
|
|
if(ENABLE_CUBEB)
|
|
add_subdirectory(cubeb)
|
|
@@ -35,3 +24,14 @@ if(${CPU_ARCH} STREQUAL "aarch32" OR ${CPU_ARCH} STREQUAL "aarch64")
|
|
add_subdirectory(vixl)
|
|
endif()
|
|
|
|
+find_package(PkgConfig REQUIRED)
|
|
+pkg_check_modules(zstd REQUIRED libzstd IMPORTED_TARGET GLOBAL)
|
|
+add_library(Zstd::Zstd ALIAS PkgConfig::zstd)
|
|
+pkg_check_modules(fmt REQUIRED fmt IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(minizip REQUIRED minizip IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(soundtouch REQUIRED soundtouch IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(tinyxml2 REQUIRED tinyxml2 IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(zlib REQUIRED zlib IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(xxhash REQUIRED libxxhash IMPORTED_TARGET GLOBAL)
|
|
+pkg_check_modules(rapidjson REQUIRED RapidJSON IMPORTED_TARGET GLOBAL)
|
|
+find_package(Vulkan)
|
|
diff --git a/dep/libchdr/CMakeLists.txt b/dep/libchdr/CMakeLists.txt
|
|
index 05b8c7a..9fe2b3e 100644
|
|
--- a/dep/libchdr/CMakeLists.txt
|
|
+++ b/dep/libchdr/CMakeLists.txt
|
|
@@ -15,5 +15,5 @@ add_library(libchdr
|
|
)
|
|
|
|
target_include_directories(libchdr PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
-target_link_libraries(libchdr PRIVATE zlib lzma)
|
|
+target_link_libraries(libchdr PRIVATE z lzma)
|
|
|
|
diff --git a/dep/stb/CMakeLists.txt b/dep/stb/CMakeLists.txt
|
|
index 8206b10..dda493e 100644
|
|
--- a/dep/stb/CMakeLists.txt
|
|
+++ b/dep/stb/CMakeLists.txt
|
|
@@ -10,4 +10,4 @@ set(SRCS
|
|
add_library(stb ${SRCS})
|
|
target_include_directories(stb PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
|
target_include_directories(stb INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
-target_link_libraries(stb zlib Threads::Threads "${CMAKE_DL_LIBS}")
|
|
+target_link_libraries(stb z Threads::Threads "${CMAKE_DL_LIBS}")
|
|
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
|
|
index 44036ab..472db15 100644
|
|
--- a/src/common/CMakeLists.txt
|
|
+++ b/src/common/CMakeLists.txt
|
|
@@ -61,8 +61,8 @@ add_library(common
|
|
|
|
target_include_directories(common PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
-target_link_libraries(common PUBLIC fmt Threads::Threads vulkan-headers GSL fast_float)
|
|
-target_link_libraries(common PRIVATE stb libchdr zlib minizip Zstd::Zstd "${CMAKE_DL_LIBS}")
|
|
+target_link_libraries(common PUBLIC fmt Threads::Threads)
|
|
+target_link_libraries(common PRIVATE stb libchdr z minizip Zstd::Zstd "${CMAKE_DL_LIBS}")
|
|
|
|
if(WIN32)
|
|
target_sources(common PRIVATE
|
|
@@ -244,7 +244,7 @@ if(ENABLE_VULKAN)
|
|
vulkan/util.h
|
|
)
|
|
target_compile_definitions(common PUBLIC "WITH_VULKAN=1")
|
|
- target_link_libraries(common PRIVATE glslang)
|
|
+ target_link_libraries(common PRIVATE glslang VulkanMemoryAllocator Vulkan::Vulkan)
|
|
|
|
if(APPLE)
|
|
# Needed for Vulkan Swap Chain.
|
|
diff --git a/src/common/string_util.h b/src/common/string_util.h
|
|
index 78432a8..20e83a3 100644
|
|
--- a/src/common/string_util.h
|
|
+++ b/src/common/string_util.h
|
|
@@ -13,7 +13,7 @@
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
-#include "fast_float/fast_float.h"
|
|
+#include <fast_float/fast_float.h>
|
|
|
|
// Older versions of libstdc++ are missing support for from_chars() with floats, and was only recently
|
|
// merged in libc++. So, just fall back to stringstream (yuck!) on everywhere except MSVC.
|
|
diff --git a/src/common/vulkan/loader.h b/src/common/vulkan/loader.h
|
|
index c6a6b4a..968ef8d 100644
|
|
--- a/src/common/vulkan/loader.h
|
|
+++ b/src/common/vulkan/loader.h
|
|
@@ -3,8 +3,6 @@
|
|
|
|
#pragma once
|
|
|
|
-#define VK_NO_PROTOTYPES
|
|
-
|
|
#if defined(WIN32)
|
|
|
|
#define VK_USE_PLATFORM_WIN32_KHR
|
|
@@ -31,7 +29,8 @@
|
|
#define VK_USE_PLATFORM_METAL_EXT
|
|
#endif
|
|
|
|
-#include "vulkan/vulkan.h"
|
|
+#include <vulkan/vulkan.h>
|
|
+#include <vulkan/vulkan_core.h>
|
|
|
|
// Currently, exclusive fullscreen is only supported on Windows.
|
|
#if defined(WIN32)
|
|
@@ -87,10 +86,8 @@
|
|
#pragma warning(push, 0)
|
|
#endif
|
|
|
|
-#define VMA_STATIC_VULKAN_FUNCTIONS 1
|
|
-#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
|
|
#define VMA_STATS_STRING_ENABLED 0
|
|
-#include "vulkan/vk_mem_alloc.h"
|
|
+#include <vk_mem_alloc.h>
|
|
|
|
#if defined(__clang__)
|
|
#pragma clang diagnostic pop
|
|
diff --git a/src/common/vulkan/texture.cpp b/src/common/vulkan/texture.cpp
|
|
index 82f57fb..8ded320 100644
|
|
--- a/src/common/vulkan/texture.cpp
|
|
+++ b/src/common/vulkan/texture.cpp
|
|
@@ -497,7 +497,7 @@ bool Vulkan::Texture::Update(u32 x, u32 y, u32 width, u32 height, u32 level, u32
|
|
if (res != VK_SUCCESS)
|
|
{
|
|
LOG_VULKAN_ERROR(res, "vmaCreateBuffer() failed: ");
|
|
- return VK_NULL_HANDLE;
|
|
+ return false;
|
|
}
|
|
|
|
// Immediately queue it for freeing after the command buffer finishes, since it's only needed for the copy.
|
|
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
|
index 31f4d44..29fb667 100644
|
|
--- a/src/core/CMakeLists.txt
|
|
+++ b/src/core/CMakeLists.txt
|
|
@@ -117,8 +117,8 @@ set(RECOMPILER_SRCS
|
|
|
|
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
-target_link_libraries(core PUBLIC Threads::Threads common util zlib)
|
|
-target_link_libraries(core PRIVATE stb xxhash imgui rapidjson tinyxml2)
|
|
+target_link_libraries(core PUBLIC Threads::Threads common util z)
|
|
+target_link_libraries(core PRIVATE stb ${xxhash_LIBRARIES} imgui ${rapidjson_LIBRARIES} tinyxml2)
|
|
|
|
if(WIN32)
|
|
target_sources(core PRIVATE
|
|
diff --git a/src/core/game_database.cpp b/src/core/game_database.cpp
|
|
index 7e36690..b4857fc 100644
|
|
--- a/src/core/game_database.cpp
|
|
+++ b/src/core/game_database.cpp
|
|
@@ -10,8 +10,8 @@
|
|
#include "common/string_util.h"
|
|
#include "common/timer.h"
|
|
#include "host.h"
|
|
-#include "rapidjson/document.h"
|
|
-#include "rapidjson/error/en.h"
|
|
+#include <rapidjson/document.h>
|
|
+#include <rapidjson/error/en.h>
|
|
#include "system.h"
|
|
#include "tinyxml2.h"
|
|
#include "util/cd_image.h"
|
|
diff --git a/src/core/system.cpp b/src/core/system.cpp
|
|
index cf2adef..4bbb571 100644
|
|
--- a/src/core/system.cpp
|
|
+++ b/src/core/system.cpp
|
|
@@ -46,7 +46,7 @@
|
|
#include "util/ini_settings_interface.h"
|
|
#include "util/iso_reader.h"
|
|
#include "util/state_wrapper.h"
|
|
-#include "xxhash.h"
|
|
+#include <xxhash.h>
|
|
#include <cctype>
|
|
#include <cinttypes>
|
|
#include <cmath>
|
|
diff --git a/src/core/texture_replacements.cpp b/src/core/texture_replacements.cpp
|
|
index 0edbc6b..49c0aee 100644
|
|
--- a/src/core/texture_replacements.cpp
|
|
+++ b/src/core/texture_replacements.cpp
|
|
@@ -11,10 +11,7 @@
|
|
#include "fmt/format.h"
|
|
#include "host.h"
|
|
#include "settings.h"
|
|
-#include "xxhash.h"
|
|
-#if defined(CPU_X86) || defined(CPU_X64)
|
|
-#include "xxh_x86dispatch.h"
|
|
-#endif
|
|
+#include <xxhash.h>
|
|
#include <cinttypes>
|
|
Log_SetChannel(TextureReplacements);
|
|
|
|
diff --git a/src/frontend-common/CMakeLists.txt b/src/frontend-common/CMakeLists.txt
|
|
index 6787bf8..da86422 100644
|
|
--- a/src/frontend-common/CMakeLists.txt
|
|
+++ b/src/frontend-common/CMakeLists.txt
|
|
@@ -27,7 +27,7 @@ add_library(frontend-common
|
|
postprocessing_shadergen.h
|
|
)
|
|
|
|
-target_link_libraries(frontend-common PUBLIC core common imgui tinyxml2 rapidjson scmversion)
|
|
+target_link_libraries(frontend-common PUBLIC core common imgui tinyxml2 ${rapidjson_LIBRARIES} scmversion)
|
|
|
|
if(ENABLE_CUBEB)
|
|
target_sources(frontend-common PRIVATE
|
|
@@ -137,7 +137,7 @@ if(ENABLE_CHEEVOS)
|
|
achievements.h
|
|
)
|
|
target_compile_definitions(frontend-common PUBLIC -DWITH_CHEEVOS=1)
|
|
- target_link_libraries(frontend-common PRIVATE rcheevos rapidjson)
|
|
+ target_link_libraries(frontend-common PRIVATE rcheevos ${rapidjson_LIBRARIES})
|
|
endif()
|
|
|
|
# Copy the provided data directory to the output directory.
|
|
diff --git a/src/frontend-common/achievements.cpp b/src/frontend-common/achievements.cpp
|
|
index 74fbe3b..8f0e974 100644
|
|
--- a/src/frontend-common/achievements.cpp
|
|
+++ b/src/frontend-common/achievements.cpp
|
|
@@ -20,7 +20,7 @@
|
|
#include "fullscreen_ui.h"
|
|
#include "imgui_fullscreen.h"
|
|
#include "platform_misc.h"
|
|
-#include "rapidjson/document.h"
|
|
+#include <rapidjson/document.h>
|
|
#include "rc_api_info.h"
|
|
#include "rc_api_request.h"
|
|
#include "rc_api_runtime.h"
|
|
diff --git a/src/frontend-common/imgui_overlays.cpp b/src/frontend-common/imgui_overlays.cpp
|
|
index 0a8c2d3..c998d9e 100644
|
|
--- a/src/frontend-common/imgui_overlays.cpp
|
|
+++ b/src/frontend-common/imgui_overlays.cpp
|
|
@@ -21,7 +21,7 @@
|
|
#include "fmt/chrono.h"
|
|
#include "fmt/format.h"
|
|
#include "fullscreen_ui.h"
|
|
-#include "gsl/span"
|
|
+#include <gsl/span>
|
|
#include "icon.h"
|
|
#include "imgui.h"
|
|
#include "imgui_fullscreen.h"
|
|
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
|
|
index 81a33f7..719bd99 100644
|
|
--- a/src/util/CMakeLists.txt
|
|
+++ b/src/util/CMakeLists.txt
|
|
@@ -42,4 +42,4 @@ add_library(util
|
|
target_include_directories(util PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
target_include_directories(util PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
target_link_libraries(util PUBLIC common simpleini)
|
|
-target_link_libraries(util PRIVATE libchdr zlib soundtouch)
|
|
+target_link_libraries(util PRIVATE libchdr z SoundTouch)
|