Always add third_party/libpng to include directories (thanks to Tobias Hansen).

Because private libpng headers are used by loadpng and
src/file/png_format.cpp.
This commit is contained in:
David Capello 2012-03-19 14:27:00 -03:00
parent 7115806dc4
commit 49614f6f41
3 changed files with 5 additions and 2 deletions

View File

@ -90,6 +90,11 @@ endif()
# Zlib generated zconf.h file
include_directories(${CMAKE_BINARY_DIR}/third_party/zlib)
# We need private libpng header files so it doesn't matter if we use
# the shared version of libpng or not, we need to find header files in
# "third_party/libpng"" directory.
include_directories(${LIBPNG_DIR})
# Search in the "cmake" directory for additional CMake modules.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

View File

@ -49,7 +49,6 @@ if(USE_SHARED_LIBPNG)
endif(PNG_FOUND)
else()
set(libs3rdparty ${libs3rdparty} libpng)
include_directories(${LIBPNG_DIR})
endif()
if(USE_SHARED_GIFLIB)

View File

@ -17,7 +17,6 @@ if(NOT USE_SHARED_ZLIB)
endif()
if(NOT USE_SHARED_LIBPNG)
include_directories(libpng)
add_subdirectory(libpng)
endif()