2021-04-30 20:47:47 +03:00
|
|
|
#
|
|
|
|
# JPEG library CMake configuration for the Fast Light Toolkit (FLTK).
|
|
|
|
#
|
2023-12-04 19:31:18 +03:00
|
|
|
# Copyright 1998-2023 by Bill Spitzak and others.
|
2021-04-30 20:47:47 +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
|
|
|
|
#
|
|
|
|
# Please see the following page on how to report bugs and issues:
|
|
|
|
#
|
|
|
|
# https://www.fltk.org/bugs.php
|
|
|
|
#
|
2004-10-19 00:29:58 +04:00
|
|
|
|
|
|
|
# memmgr back ends: compile only one of these into a working library
|
|
|
|
# (For now, let's use the mode that requires the image fit into memory.
|
|
|
|
# This is the recommended mode for Win32 anyway.)
|
2021-04-30 20:47:47 +03:00
|
|
|
|
|
|
|
set (systemdependent_SRCS jmemnobs.c)
|
2004-10-19 00:29:58 +04:00
|
|
|
|
|
|
|
# library object files common to compression and decompression
|
2021-04-30 20:47:47 +03:00
|
|
|
|
|
|
|
set (common_SRCS
|
|
|
|
jaricom.c jcomapi.c jutils.c jerror.c jmemmgr.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# compression library object files
|
2021-04-30 20:47:47 +03:00
|
|
|
|
|
|
|
set (compression_SRCS
|
|
|
|
jcapimin.c jcapistd.c jcarith.c jctrans.c jcparam.c jdatadst.c jcinit.c
|
|
|
|
jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
|
|
|
|
jcsample.c jchuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
|
|
|
|
jfdctint.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# decompression library object files
|
2021-04-30 20:47:47 +03:00
|
|
|
|
|
|
|
set (decompression_SRCS
|
|
|
|
jdapimin.c jdapistd.c jdarith.c jdtrans.c jdatasrc.c jdmaster.c
|
|
|
|
jdinput.c jdmarker.c jdhuff.c jdmainct.c jdcoefct.c
|
|
|
|
jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c
|
|
|
|
jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
2021-04-30 20:47:47 +03:00
|
|
|
list (APPEND BUILD_SRCS "${systemdependent_SRCS};${common_SRCS}")
|
|
|
|
list (APPEND BUILD_SRCS "${compression_SRCS};${decompression_SRCS}")
|
2021-02-21 21:29:13 +03:00
|
|
|
|
2010-04-06 02:33:58 +04:00
|
|
|
#######################################################################
|
2021-02-21 21:29:13 +03:00
|
|
|
|
|
|
|
# Suppress some Visual Studio compiler warnings
|
2021-04-30 20:47:47 +03:00
|
|
|
|
2021-02-21 21:29:13 +03:00
|
|
|
set (msvc_warnings /wd4267)
|
2010-04-06 02:33:58 +04:00
|
|
|
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-02-21 21:29:13 +03:00
|
|
|
# Build the static library
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-02-21 21:29:13 +03:00
|
|
|
|
|
|
|
FL_ADD_LIBRARY (fltk_jpeg STATIC "${BUILD_SRCS}")
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
target_compile_options (fltk_jpeg PRIVATE ${msvc_warnings})
|
|
|
|
endif (MSVC)
|
2010-04-06 02:33:58 +04:00
|
|
|
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-02-21 21:29:13 +03:00
|
|
|
# Build the shared library (optional)
|
2014-09-27 04:41:06 +04:00
|
|
|
#######################################################################
|
2021-02-21 21:29:13 +03:00
|
|
|
|
|
|
|
if (OPTION_BUILD_SHARED_LIBS)
|
2021-04-30 20:47:47 +03:00
|
|
|
|
2021-02-21 21:29:13 +03:00
|
|
|
FL_ADD_LIBRARY (fltk_jpeg SHARED "${BUILD_SRCS}")
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
target_compile_options (fltk_jpeg_SHARED PRIVATE ${msvc_warnings})
|
|
|
|
endif (MSVC)
|
|
|
|
|
|
|
|
endif (OPTION_BUILD_SHARED_LIBS)
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Install the library headers
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
install (FILES jconfig.h jerror.h jmorecfg.h jpeglib.h
|
2021-05-31 22:54:32 +03:00
|
|
|
fltk_jpeg_prefix.h
|
2021-02-21 21:29:13 +03:00
|
|
|
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
|
|
|
)
|