From bf4c67c35daa9fa65da7787aa40f25b2865493a2 Mon Sep 17 00:00:00 2001 From: fschildt Date: Wed, 21 Jan 2026 03:57:14 +0100 Subject: stb_truetype: build it from external/ --- cmake/CMakeLists.txt | 11 ++--------- external/stb/stb_truetype.c | 3 +++ src/common/stb_truetype.cpp | 3 --- 3 files changed, 5 insertions(+), 12 deletions(-) create mode 100644 external/stb/stb_truetype.c delete mode 100644 src/common/stb_truetype.cpp diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 8463386..85e8dcb 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -71,15 +71,8 @@ target_include_directories(glad PUBLIC ${GLAD_INC_DIR}) # stb -add_library(stb_truetype STATIC ${FSARCADE_SRC_DIR}/common/stb_truetype.cpp) -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - target_compile_options(stb_truetype PRIVATE -w) # -w suppresses all warnings -elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_compile_options(stb_truetype PRIVATE /W0) # /W0 suppresses all warnings -endif() -target_include_directories(stb_truetype PUBLIC - ${FSARCADE_ROOT_DIR}/external/stb -) +add_library(stb_truetype STATIC ${FSARCADE_ROOT_DIR}/external/stb/stb_truetype.c) +target_include_directories(stb_truetype PUBLIC ${FSARCADE_ROOT_DIR}/external/stb) target_link_libraries(fsarcade SDL3::SDL3 GL glad dl imgui stb_truetype) diff --git a/external/stb/stb_truetype.c b/external/stb/stb_truetype.c new file mode 100644 index 0000000..cc11b20 --- /dev/null +++ b/external/stb/stb_truetype.c @@ -0,0 +1,3 @@ +#define STB_TRUETYPE_IMPLEMENTATION +#include + diff --git a/src/common/stb_truetype.cpp b/src/common/stb_truetype.cpp deleted file mode 100644 index cc11b20..0000000 --- a/src/common/stb_truetype.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#define STB_TRUETYPE_IMPLEMENTATION -#include - -- cgit v1.2.3