diff --git a/src/SFML/Graphics/stb_image/stb_image.h b/extlibs/headers/stb_image/stb_image.h similarity index 100% rename from src/SFML/Graphics/stb_image/stb_image.h rename to extlibs/headers/stb_image/stb_image.h diff --git a/src/SFML/Graphics/stb_image/stb_image_write.h b/extlibs/headers/stb_image/stb_image_write.h similarity index 100% rename from src/SFML/Graphics/stb_image/stb_image_write.h rename to extlibs/headers/stb_image/stb_image_write.h diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt index 81a730e37..9147893eb 100644 --- a/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt @@ -80,22 +80,15 @@ set(RENDER_TEXTURE_SRC source_group("render texture" FILES ${RENDER_TEXTURE_SRC}) # stb_image sources -set(STB_SRC - ${SRCROOT}/stb_image/stb_image.h - ${SRCROOT}/stb_image/stb_image_write.h -) -source_group("stb_image" FILES ${STB_SRC}) - -# let CMake know about our additional graphics libraries paths (on Windows and OSX) -if(SFML_OS_WINDOWS OR SFML_OS_MACOSX) - set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/jpeg") -endif() +include_directories("${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image") # let CMake know about our additional graphics libraries paths if(SFML_OS_WINDOWS) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/jpeg") set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/windows") set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/windows/freetype") elseif(SFML_OS_MACOSX) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/jpeg") set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/osx") set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers/libfreetype/osx/freetype2") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-osx/Frameworks") diff --git a/src/SFML/Graphics/ImageLoader.cpp b/src/SFML/Graphics/ImageLoader.cpp index be6aecf56..f544c9cc5 100644 --- a/src/SFML/Graphics/ImageLoader.cpp +++ b/src/SFML/Graphics/ImageLoader.cpp @@ -28,9 +28,9 @@ #include #include #include -#include +#include #define STB_IMAGE_WRITE_IMPLEMENTATION -#include +#include extern "C" { #include