From d725ed8cd0730b81f1d8b6c2681cffd87ebad59e Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 1 Aug 2023 20:13:38 +0200 Subject: [PATCH] add stb --- external/CMakeLists.txt | 2 ++ external/stb/CMakeLists.txt | 13 +++++++++++++ external/stb/stb_image.cpp | 3 +++ external/stb/stb_image_write.cpp | 3 +++ 4 files changed, 21 insertions(+) create mode 100644 external/stb/CMakeLists.txt create mode 100644 external/stb/stb_image.cpp create mode 100644 external/stb/stb_image_write.cpp diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 84ffd02a..ce8ec971 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -15,3 +15,5 @@ add_subdirectory(./solanaceae_tox) add_subdirectory(./sdl) add_subdirectory(./imgui) +add_subdirectory(./stb) + diff --git a/external/stb/CMakeLists.txt b/external/stb/CMakeLists.txt new file mode 100644 index 00000000..211a774a --- /dev/null +++ b/external/stb/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + +project(stb C CXX) + +add_library(stb INTERFACE) +target_include_directories(stb SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") + +add_library(stb_image "stb/stb_image.h" "stb_image.cpp") +target_link_libraries(stb_image stb) + +add_library(stb_image_write "stb/stb_image_write.h" "stb_image_write.cpp") +target_link_libraries(stb_image_write stb) + diff --git a/external/stb/stb_image.cpp b/external/stb/stb_image.cpp new file mode 100644 index 00000000..f2d2039e --- /dev/null +++ b/external/stb/stb_image.cpp @@ -0,0 +1,3 @@ +#define STB_IMAGE_IMPLEMENTATION +#include "stb/stb_image.h" + diff --git a/external/stb/stb_image_write.cpp b/external/stb/stb_image_write.cpp new file mode 100644 index 00000000..9199f428 --- /dev/null +++ b/external/stb/stb_image_write.cpp @@ -0,0 +1,3 @@ +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb/stb_image_write.h" +