metaforce/hecl/extern/libpng/CMakeLists.txt

39 lines
727 B
CMake
Raw Normal View History

if(NOT WIN32 AND NOT APPLE)
2015-07-28 02:25:33 +00:00
find_library(PNG_LIB png)
endif()
2015-11-22 23:50:11 +00:00
if(WIN32 OR APPLE OR PNG_LIB STREQUAL PNG_LIB-NOTFOUND)
2015-11-11 04:01:36 +00:00
message(STATUS "Using HECL's built-in libpng")
2015-07-22 19:14:50 +00:00
include_directories(${ZLIB_INCLUDE_DIR})
2015-07-07 03:24:09 +00:00
add_library(png
png.h
pngconf.h
pngdebug.h
pnginfo.h
pngpriv.h
pngstruct.h
pnglibconf.h
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
2015-07-28 02:25:33 +00:00
pngwutil.c)
2015-09-02 18:52:04 +00:00
set(PNG_LIB png CACHE PATH "PNG library" FORCE)
2015-07-28 02:25:33 +00:00
set(LIBPNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "PNG include path" FORCE)
2015-09-02 18:52:04 +00:00
2015-11-22 23:50:11 +00:00
else()
find_path(LIBPNG_INCLUDE_DIR png.h)
endif()