2020-01-09 18:26:29 +00:00
|
|
|
#
|
|
|
|
|
# PNG library CMake configuration for the Fast Light Toolkit (FLTK).
|
|
|
|
|
#
|
2021-02-15 18:45:20 +00:00
|
|
|
# Copyright 1998-2021 by Bill Spitzak and others.
|
2020-01-09 18:26:29 +00:00
|
|
|
#
|
|
|
|
|
# This library is free software. Distribution and use rights are outlined in
|
|
|
|
|
# the file "COPYING" which should have been included with this file. If this
|
|
|
|
|
# file is missing or damaged, see the license at:
|
|
|
|
|
#
|
|
|
|
|
# https://www.fltk.org/COPYING.php
|
|
|
|
|
#
|
2020-07-01 16:03:10 +00:00
|
|
|
# Please see the following page on how to report bugs and issues:
|
2020-01-09 18:26:29 +00:00
|
|
|
#
|
2020-07-01 16:03:10 +00:00
|
|
|
# https://www.fltk.org/bugs.php
|
2020-01-09 18:26:29 +00:00
|
|
|
#
|
2004-10-18 20:29:58 +00:00
|
|
|
|
2012-05-29 14:08:40 +00:00
|
|
|
# source files for png
|
|
|
|
|
set(PNG_SRCS
|
2015-03-16 16:47:32 +00:00
|
|
|
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
|
|
|
|
|
pngwutil.c
|
2021-02-15 18:45:20 +00:00
|
|
|
|
|
|
|
|
# build on ARM (Apple M1 systems)
|
2020-06-24 19:55:39 +00:00
|
|
|
arm/arm_init.c
|
|
|
|
|
arm/filter_neon_intrinsics.c
|
|
|
|
|
arm/palette_neon_intrinsics.c
|
2010-04-05 22:33:58 +00:00
|
|
|
)
|
|
|
|
|
|
2012-05-29 14:08:40 +00:00
|
|
|
#######################################################################
|
2014-09-27 00:41:06 +00:00
|
|
|
FL_ADD_LIBRARY(fltk_png STATIC "${PNG_SRCS}")
|
2015-02-16 16:29:49 +00:00
|
|
|
# install the png headers
|
|
|
|
|
install(FILES png.h;pngconf.h;pnglibconf.h
|
|
|
|
|
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
|
|
|
|
)
|
2010-04-05 22:33:58 +00:00
|
|
|
|
2014-09-27 00:41:06 +00:00
|
|
|
if(OPTION_USE_SYSTEM_ZLIB)
|
|
|
|
|
target_link_libraries(fltk_png ${FLTK_ZLIB_LIBRARIES})
|
2012-05-29 14:08:40 +00:00
|
|
|
else()
|
2014-09-27 00:41:06 +00:00
|
|
|
target_link_libraries(fltk_png fltk_z)
|
|
|
|
|
endif(OPTION_USE_SYSTEM_ZLIB)
|
2010-04-05 22:33:58 +00:00
|
|
|
|
2014-09-27 00:41:06 +00:00
|
|
|
#######################################################################
|
|
|
|
|
if(OPTION_BUILD_SHARED_LIBS)
|
|
|
|
|
#######################################################################
|
|
|
|
|
FL_ADD_LIBRARY(fltk_png SHARED "${PNG_SRCS}")
|
2010-04-05 22:33:58 +00:00
|
|
|
|
2014-09-27 00:41:06 +00:00
|
|
|
if(OPTION_USE_SYSTEM_ZLIB)
|
|
|
|
|
target_link_libraries(fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
target_link_libraries(fltk_png_SHARED fltk_z_SHARED)
|
|
|
|
|
endif(OPTION_USE_SYSTEM_ZLIB)
|
|
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
|
endif(OPTION_BUILD_SHARED_LIBS)
|
|
|
|
|
#######################################################################
|