Clean up libstb_image (#1494)

This commit is contained in:
water111
2022-06-19 19:48:34 -04:00
committed by GitHub
parent f48fda692e
commit 196c09a232
15 changed files with 29 additions and 8734 deletions
+2
View File
@@ -162,8 +162,10 @@ add_subdirectory(third-party/lzokay EXCLUDE_FROM_ALL)
# build format library
add_subdirectory(third-party/fmt EXCLUDE_FROM_ALL)
add_subdirectory(third-party/stb_image EXCLUDE_FROM_ALL)
add_subdirectory(third-party/tiny_gltf EXCLUDE_FROM_ALL)
# discord rich presence
include_directories(third-party/discord-rpc/include)
add_subdirectory(third-party/discord-rpc EXCLUDE_FROM_ALL)
+1 -2
View File
@@ -47,8 +47,7 @@ add_library(common
util/os.cpp
util/print_float.cpp
util/FontUtils.cpp
util/FrameLimiter.cpp
util/image_loading.cpp)
util/FrameLimiter.cpp)
target_link_libraries(common fmt lzokay replxx libzstd_static)
-13
View File
@@ -1,13 +0,0 @@
// hides warnings
#ifdef __linux__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-qual"
#endif
#define STB_IMAGE_IMPLEMENTATION
#include "third-party/stb_image.h"
#ifdef __linux__
#pragma GCC diagnostic pop
#endif
-1
View File
@@ -1 +0,0 @@
#include "third-party/stb_image.h"
+5 -2
View File
@@ -83,6 +83,7 @@ target_link_libraries(decomp
lzokay
common
fmt
stb_image
)
add_executable(decompiler
@@ -92,7 +93,8 @@ target_link_libraries(decompiler
decomp
common
lzokay
fmt)
fmt
stb_image)
add_executable(extractor
@@ -103,4 +105,5 @@ target_link_libraries(extractor
common
lzokay
fmt
compiler)
compiler
stb_image)
+1 -1
View File
@@ -2,7 +2,7 @@
#include "third-party/fmt/core.h"
#include "common/util/Assert.h"
#include "third-party/stb_image.h"
#include "third-party/stb_image/stb_image.h"
#include <filesystem>
namespace decompiler {
+1 -1
View File
@@ -157,7 +157,7 @@ add_subdirectory(sound)
# we build the runtime as a static library.
add_library(runtime STATIC ${RUNTIME_SOURCE} "../third-party/glad/src/glad.c")
target_link_libraries(runtime common fmt glfw imgui discord-rpc sound)
target_link_libraries(runtime common fmt glfw imgui discord-rpc sound stb_image)
if(WIN32)
target_link_libraries(runtime mman)
else()
+1 -1
View File
@@ -21,7 +21,7 @@
#include "game/system/newpad.h"
#include "common/log/log.h"
#include "common/goal_constants.h"
#include "common/util/image_loading.h"
#include "third-party/stb_image/stb_image.h"
#include "game/runtime.h"
#include "common/util/Timer.h"
#include "game/graphics/opengl_renderer/debug_gui.h"
Generated Vendored
-8709
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
if (UNIX)
set(CMAKE_CXX_FLAGS "-O3")
else ()
set(CMAKE_CXX_FLAGS "/EHsc")
endif (UNIX)
add_library(stb_image stb_image.cpp)
+4
View File
@@ -0,0 +1,4 @@
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "stb_image.h"
+2 -1
View File
@@ -4,6 +4,7 @@ else ()
set(CMAKE_CXX_FLAGS "/EHsc")
endif (UNIX)
include_directories(../)
include_directories(../ ../stb_image)
add_library(tiny_gltf tiny_gltf.cpp)
target_link_libraries(tiny_gltf stb_image)
+3 -3
View File
@@ -1,4 +1,4 @@
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "tiny_gltf.h"
#include "third-party/tiny_gltf/tiny_gltf.h"