Commit Graph

88 Commits (master)

Author SHA1 Message Date
مهدي شينون (Mehdi Chinoune) 7efcf4f935
Some fixes for MINGW (#828)
* Enable webpng on MINGW

* Detect GD version using cmake language

* Use _aligned_malloc instead of posix_memalign on Windows

* Include missing "errno.h"

* Fix finding WEBP on MINGW

* Fix finding XPM on MINGW

* Use PkgConfig to find packages on MINGW

* CI: Enable more options  for MINGW
2022-04-15 15:34:24 +07:00
Pierre Joye f1a53c0821
#788 fix bug in HEIF usage, stride is require (#801)
fix bug #788 in HEIF usage, stride is require
2022-01-22 17:29:04 +07:00
Pierre Joye d99d021b50 generate and use config.h from/to build dir (github user LRFLEW) 2021-09-10 05:08:53 +07:00
Pierre Joye 9aa4f9bc0f add option to enable CMAKE_VERBOSE_MAKEFILE; enable it on MacOs for now 2021-08-25 19:32:55 +07:00
Pierre Joye 4cf3715a9a add option to enable/disable CPP API 2021-08-22 11:50:59 +07:00
Pierre Joye 2ddd6d30ea fix else syntax 2021-08-21 17:52:54 +07:00
Pierre Joye 24dd23aa84 add option to enable gcc ASAN in debug mode 2021-08-21 17:36:52 +07:00
Pierre Joye 29e98b5e24 disable sanitizer for now, HEIF Leaks... 2021-08-21 14:07:41 +07:00
Pierre Joye c08434eb74 add docs 2021-08-20 11:22:24 +07:00
Pierre Joye 08e11534f6 add sanitize=address by default in debug and gcc 2021-08-14 01:45:28 +07:00
Gregory Boyce f8cd3dbbc7 Set GD_LIB to gd on mingw
Setting GD_LIB to libgd on MINGW builds results in
liblibgd.a and liblibgd.dll.a being built.
2021-07-15 15:39:15 -04:00
Mike Frysinger 27da3a23e7 getver: rewrite from perl to shell+awk #535
People are more familiar with shell than perl at this point.
Fixes #535.
2021-04-24 22:48:24 -04:00
Ben Morss f2aa2836ed
AVIF support (#671)
Demand for AVIF support on the web is growing, as the word gets out
about this new file format which allows higher-quality encoding at
smaller sizes.  Core contributors to major open-source CMSs are
interested in auto-generating AVIF images! They've been simply
waiting for support to appear in libgd.

This PR aims to meet the growing demand, and to help bring smaller,
more beautiful images to more of the web - to sites created by
experienced developers and CMS users alike.

This PR adds support by incorporating libavif in addition to the
existing libheif support.  It's generally felt that libavif has
more complete support for the AVIF format. libavif is also used
by the Chromium project and squoosh.app.

In this PR, I've endeavored to incorporate the latest research into
best practices for AVIF encoding - not just for default quantizer
values, but also an algorithm for determining the number of
horizontal tiles, vertical tiles, and threads.

Fixes #557.
2021-03-03 21:35:56 -05:00
Martin Reboredo 39c4644fa0
HEIF support through libheif (#670)
With the adoption of AVIF by Firefox and Chromium based browsers (still
in experimental phase), the newer incorporation of HEIF by Canon and Sony 
in their cameras and the newer support of both of them in modern software 
like ImageMagick, GIMP and Krita, `gd` haven't seen any endorsement for
the formats up until this PR.

Reading and writing is done by `libheif`, with functionality for chroma 
subsampling (for now `4:2:0`, `4:2:2` and `4:4:4`), quality (with new
`200` for lossless) and compression (whether `HEVC` or `AV1`) selection. 

This was tested with `libheif` version `1.11.0` in my Solus machine.

Also, fixes both #395 and #557.
2021-03-02 12:32:03 -05:00
wilson chen 28ecfe77c8
fix #303: gdlib.pc: use Requires instead of Libs (#537) 2020-06-18 14:55:32 +08:00
wilson chen 450fd2e843
Fixed #472: Adjusting CMakeLists.txt (#582)
Add REQUIRED to FIND_PACKAGE
2020-05-10 22:41:14 +08:00
willson-chen 2ba27b5db3 Add REQUIRED to FIND_PACKAGE(ZLIB) 2020-05-07 23:55:01 -04:00
willson-chen 78b1f2bdf3 CMakeLists.txt: zlib is enabled implicitly
zlib is enabled only when ENABLE_PNG or ENABLE_GD_FORMATS is on.
2020-05-07 23:55:01 -04:00
Rosen Penev f437a2243e
cmake: remove required host includes (#617)
This breaks cross-compilation. More info:
https://github.com/openwrt/packages/pull/10079
2020-03-31 19:22:39 +08:00
willson-chen 3b89ca6766 Fix #164: update doc files install directory in CMakeLists.txt (#536)
Change install directory from 'share/docs' to 'share/doc/gd-<major>.<minor>'.
2019-11-14 02:25:49 -05:00
willson-chen 4cb9825f32 Update cmake min version to 3.7 2019-11-06 13:23:03 -08:00
willson-chen fbc8833e99 FindLIQ.cmake: delete libimagequant source code download logic
* FindLIQ.cmake: add comment of LIQ_BUILD which is used in CMakeLists.txt

And fixed some indent error.

* FindLIQ.cmake: delete download libimagequant source code logic.

* And delete the LIQ_BUILD logic in CMakeLists.txt correspondingly.
* Fixed some indent errors.

* FindLIQ.cmake: Delete libimagequant download path
2019-11-04 23:48:27 -08:00
willson-chen ac7118680d Fix #539: Add RAQM support for cmake
* Add `ENABLE_RAQM` option to CMakeLists.txt
* Add cmake module FindRAQM.cmake
2019-11-02 00:59:43 -06:00
willson-chen 6049895bf3 CMakeLists.txt: set cpack vendor and version dynamically 2019-10-26 22:36:51 -07:00
Mike Frysinger 820033c152 cmake: drop old CMP0017 policy
Doesn't seem like it's really needed.  Newer versions of cmake will
warn when it's seen at least.  Lets drop it and see if anyone notices.
Fixes #525.
2019-10-26 19:11:05 -04:00
Peter Kokot 01c59d840b Remove Git ident attributes
Git ident attributes were in most cases utilized with SVN and keywords
substitutions, where $Id$ were replaced with certain revision from the
repository. In Git this functionality is different. Each $Id$ needs to
be defined in .gitattributes file to be effective. This patch removes
unused and outdated attributes.
2018-06-27 02:04:37 +02:00
Mike Frysinger fd06f7f83c clean up trailing whitespace/newlines
This is preparation for adding some linting checks for new commits from
people.  Shouldn't be any functional changes here (tests still pass!).
2018-06-21 22:47:42 -04:00
Mike Frysinger 14b8020dda make gd/gd2 image formats optional #428
We still enable them by default, but we'll probably flip them off
in the next major release series.
2018-01-30 17:58:44 -05:00
Mike Frysinger 5ebbd50cff cmake: add soname info to libgd.so
Pull out the library versioning info out of configure and into a common
script that both cmake & autotools can run.  This way we have a single
source of truth for the versioning info.
2016-11-10 09:09:14 -05:00
Mike Frysinger 7c6c8801d9 cmake: use getver.pl for version fields like autotools
We rename the vars to match configure too, but this isn't a big deal as
they aren't (yet) used by the rest of the cmake code.
2016-11-10 09:09:14 -05:00
Mike Frysinger 5090a9ebf7 cmake: allow static libs to be disabled
The standard behavior in distros nowadays is to build shared libs and
omit static libs.  Split the build knobs in cmake to support this.  It
also matches what's available with the autotools build.
2016-07-22 15:09:04 +05:30
Mike Frysinger 1e9d800842 cmake: add distclean target
There's no way to properly/fully clean a cmake build when it's configured
in-tree because they only really want to support out-of-tree builds.  Add
a custom script to handle this instead.
2016-07-21 21:40:56 +05:30
Mike Frysinger c9a4a85f38 libimagequant: fix integration
The symbol was being set up in cmake but not on the autotools side.
Clean this up to be like other external libraries.

We need to pull in some openmp logic as it's not uncommon for the lib
to be built with openmp support.  When we test for it, we need to do
so with openmp flags.

Fixes #137.
2016-05-18 03:03:50 -04:00
Mike Frysinger adc8598dcb tests: unify cmake test code into a single macro
This makes the test code a lot easier to manage rather than copying &
pasting the same boiler plate multiple times.

Also take the opportunity to add a common prefix to each test name so
we don't get collisions between subdirs if a test happens to use the
same exact name.
2016-04-30 21:02:45 -04:00
Leo Yang 7147b646f4 Make BUILD_SHARED_LIBS configurable
As previously build both shared and static if BUILD_SHARED_LIBS is ON.
Otherwise build static only.
2015-08-27 13:11:37 -04:00
Wangkun 917fa11bfb fix CMake error when ENABLE_WEBP 2015-05-07 17:48:37 +08:00
Pierre Joye 0e9c4e005d master is now 2.2.0-dev 2015-01-15 02:28:23 +01:00
Pierre Joye 06b2e4f32f back to dev 2015-01-15 01:18:07 +01:00
Pierre Joye 4e6689946f update version 2015-01-14 03:42:53 +01:00
Nathanael Jones 40c6129986 Normalize static lib name to libgd.a on *nix and libgd_static.lib on windows. 2015-01-07 01:55:53 -05:00
Nathanael Jones 07c3fde37e Drop -m32 definition on MINGW; prevents a 64-bit build from occurring. 2015-01-07 01:39:10 -05:00
Nathanael Jones f82b371418 Add libiconv support to CMake files 2014-10-02 14:59:29 -04:00
Pierre Joye a0f58c6abf fix #81, cmake_minimum_required must be the 1st line in 2.8+ 2013-07-14 13:19:13 +02:00
Pierre Joye 4e6b784901 fix #58, install error 2013-06-11 14:01:01 +02:00
Ondřej Surý b22f9885ae Define version just once using m4_define and bump version to 2.1.0-alpha1 2013-05-13 16:34:09 +02:00
Ondřej Surý 9d20d61bf0 Add C99 inttypes support to gd.c 2013-05-02 09:30:37 +02:00
Pierre Joye fc645c765e fix run tests with shared lib build 2013-04-24 08:35:51 +02:00
Pierre Joye 843e64bd22 disable new policy for local modules 2013-04-24 07:51:41 +02:00
Takeshi Abe 18a7c356e8 drop .hgignore 2013-04-24 09:41:09 +09:00
Ondřej Surý 302d124c9b Remove duplicate -DBGDWIN32 2013-04-23 05:35:52 +02:00