summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAlexandre Bouvier <contact@amb.tf>2023-10-12 16:36:26 +0200
committerAlexandre Bouvier <contact@amb.tf>2023-10-25 21:47:32 +0200
commit79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763 (patch)
tree31f33d5ccac863e5584b3be53cd2e07a314c9b8e /src/common
parentMerge pull request #11812 from german77/save_capture (diff)
downloadyuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar.gz
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar.bz2
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar.lz
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar.xz
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.tar.zst
yuzu-79ba5d9c260ca4e2890b8e9c9efd79e3df5fe763.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt6
-rw-r--r--src/common/stb.cpp8
-rw-r--r--src/common/stb.h8
3 files changed, 21 insertions, 1 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 8a1861051..e216eb3de 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -120,6 +120,8 @@ add_library(common STATIC
socket_types.h
spin_lock.cpp
spin_lock.h
+ stb.cpp
+ stb.h
steady_clock.cpp
steady_clock.h
stream.cpp
@@ -208,6 +210,8 @@ if (MSVC)
/we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
/we4800 # Implicit conversion from 'type' to bool. Possible information loss
)
+else()
+ set_source_files_properties(stb.cpp PROPERTIES COMPILE_OPTIONS "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
@@ -223,7 +227,7 @@ endif()
create_target_directory_groups(common)
-target_link_libraries(common PUBLIC Boost::context Boost::headers fmt::fmt microprofile Threads::Threads)
+target_link_libraries(common PUBLIC Boost::context Boost::headers fmt::fmt microprofile stb::headers Threads::Threads)
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle)
if (ANDROID)
diff --git a/src/common/stb.cpp b/src/common/stb.cpp
new file mode 100644
index 000000000..d3b16665d
--- /dev/null
+++ b/src/common/stb.cpp
@@ -0,0 +1,8 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#define STB_IMAGE_IMPLEMENTATION
+#define STB_IMAGE_RESIZE_IMPLEMENTATION
+#define STB_IMAGE_WRITE_IMPLEMENTATION
+
+#include "common/stb.h"
diff --git a/src/common/stb.h b/src/common/stb.h
new file mode 100644
index 000000000..e5c197c11
--- /dev/null
+++ b/src/common/stb.h
@@ -0,0 +1,8 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stb_image.h>
+#include <stb_image_resize.h>
+#include <stb_image_write.h>