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.)
|
2010-04-06 02:33:58 +04:00
|
|
|
set(systemdependent_SRCS jmemnobs.c)
|
2004-10-19 00:29:58 +04:00
|
|
|
|
|
|
|
# library object files common to compression and decompression
|
2010-04-06 02:33:58 +04:00
|
|
|
set(common_SRCS
|
2011-02-15 18:25:53 +03:00
|
|
|
jaricom.c jcomapi.c jutils.c jerror.c jmemmgr.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# compression library object files
|
2010-04-06 02:33:58 +04:00
|
|
|
set(compression_SRCS
|
2011-02-15 18:25:53 +03:00
|
|
|
jcapimin.c jcapistd.c jcarith.c jctrans.c jcparam.c jdatadst.c jcinit.c
|
2010-04-06 02:33:58 +04:00
|
|
|
jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
|
2011-02-15 18:25:53 +03:00
|
|
|
jcsample.c jchuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
|
2010-04-06 02:33:58 +04:00
|
|
|
jfdctint.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# decompression library object files
|
2010-04-06 02:33:58 +04:00
|
|
|
set(decompression_SRCS
|
2011-02-15 18:25:53 +03:00
|
|
|
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
|
2010-04-06 02:33:58 +04:00
|
|
|
jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
|
2004-10-19 00:29:58 +04:00
|
|
|
)
|
|
|
|
|
2014-09-27 04:41:06 +04: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
|
|
|
|
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)
|
|
|
|
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
|
|
|
|
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
|
|
|
)
|