Description: Unbundle libstb
 Use headers from libstb-dev and link directly to the library instead
 of using bundled copy removed from extlibs.
Author: James Cowgill <jcowgill@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/SFML/Graphics/CMakeLists.txt
+++ b/src/SFML/Graphics/CMakeLists.txt
@@ -93,7 +93,9 @@ sfml_add_library(Graphics
 target_link_libraries(sfml-graphics PUBLIC SFML::Window)
 
 # stb_image sources
-target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image")
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(stb REQUIRED IMPORTED_TARGET stb)
+target_link_libraries(sfml-graphics PRIVATE PkgConfig::stb)
 
 # glad sources
 target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include")
--- a/src/SFML/Graphics/Image.cpp
+++ b/src/SFML/Graphics/Image.cpp
@@ -36,9 +36,7 @@
 #include <SFML/System/Android/ResourceStream.hpp>
 #endif
 
-#define STB_IMAGE_IMPLEMENTATION
 #include <stb_image.h>
-#define STB_IMAGE_WRITE_IMPLEMENTATION
 #include <stb_image_write.h>
 
 #include <algorithm>
