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" +