From 5dbfb477a012c3dd9d999be947c78432e7069eb4 Mon Sep 17 00:00:00 2001 From: binary1248 Date: Fri, 6 Feb 2015 18:32:04 +0100 Subject: [PATCH] Moved stb_image into the extlibs directory. --- .../headers}/stb_image/stb_image.h | 0 .../headers}/stb_image/stb_image_write.h | 0 src/SFML/Graphics/CMakeLists.txt | 13 +++---------- src/SFML/Graphics/ImageLoader.cpp | 4 ++-- 4 files changed, 5 insertions(+), 12 deletions(-) rename {src/SFML/Graphics => extlibs/headers}/stb_image/stb_image.h (100%) rename {src/SFML/Graphics => extlibs/headers}/stb_image/stb_image_write.h (100%) 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