2020-01-09 21:26:29 +03:00
|
|
|
#
|
|
|
|
# PNG library CMake configuration for the Fast Light Toolkit (FLTK).
|
|
|
|
#
|
2021-02-15 21:45:20 +03:00
|
|
|
# Copyright 1998-2021 by Bill Spitzak and others.
|
2020-01-09 21:26:29 +03: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 19:03:10 +03:00
|
|
|
# Please see the following page on how to report bugs and issues:
|
2020-01-09 21:26:29 +03:00
|
|
|
#
|
2020-07-01 19:03:10 +03:00
|
|
|
# https://www.fltk.org/bugs.php
|
2020-01-09 21:26:29 +03:00
|
|
|
#
|
2004-10-19 00:29:58 +04:00
|
|
|
|
2012-05-29 18:08:40 +04:00
|
|
|
# source files for png
|
|
|
|
set(PNG_SRCS
|
2015-03-16 19:47:32 +03: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 21:45:20 +03:00
|
|
|
|
|
|
|
# build on ARM (Apple M1 systems)
|
2020-06-24 22:55:39 +03:00
|
|
|
arm/arm_init.c
|
|
|
|
arm/filter_neon_intrinsics.c
|
|
|
|
arm/palette_neon_intrinsics.c
|
2010-04-06 02:33:58 +04:00
|
|
|
)
|
|
|
|
|
2012-05-29 18:08:40 +04:00
|
|
|
#######################################################################
|
2021-04-30 20:47:47 +03:00
|
|
|
# Build the static library
|
|
|
|
#######################################################################
|
2010-04-06 02:33:58 +04:00
|
|
|
|
2021-04-30 20:47:47 +03:00
|
|
|
FL_ADD_LIBRARY (fltk_png STATIC "${PNG_SRCS}")
|
|
|
|
target_link_libraries (fltk_png ${FLTK_ZLIB_LIBRARIES})
|
2010-04-06 02:33:58 +04:00
|
|
|
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-04-30 20:47:47 +03:00
|
|
|
# Build the shared library (optional)
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2010-04-06 02:33:58 +04:00
|
|
|
|
2021-04-30 20:47:47 +03:00
|
|
|
if (OPTION_BUILD_SHARED_LIBS)
|
|
|
|
|
|
|
|
FL_ADD_LIBRARY (fltk_png SHARED "${PNG_SRCS}")
|
|
|
|
|
|
|
|
if (FLTK_USE_BUILTIN_ZLIB)
|
|
|
|
target_link_libraries (fltk_png_SHARED fltk_z_SHARED)
|
|
|
|
else()
|
|
|
|
target_link_libraries (fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES})
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
endif ()
|
2014-09-27 04:41:06 +04:00
|
|
|
|
|
|
|
#######################################################################
|
2021-04-30 20:47:47 +03:00
|
|
|
# Install the library headers
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-04-30 20:47:47 +03:00
|
|
|
|
2021-05-31 19:04:49 +03:00
|
|
|
install (FILES png.h pngconf.h pnglibconf.h pngprefix.h
|
2021-04-30 20:47:47 +03:00
|
|
|
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
|
|
|
)
|