libgd icon indicating copy to clipboard operation
libgd copied to clipboard

Support libavif 1.0 in CMake build

Open kmilos opened this issue 2 years ago • 5 comments

Because of the SameMajorVersion libavif CMake config file policy the latest 1.0.x will currently get rejected when find_package(libavif 0.8.2) is requested.

CMake Warning at CMakeLists.txt:5 (find_package):
  Could not find a configuration file for package "libavif" that is
  compatible with requested version "0.8.2".

  The following configuration files were considered but not accepted:

    C:/msys64/ucrt64/lib/cmake/libavif/libavif-config.cmake, version: 1.0.1

No problem w/ Autotools build as it grabs and compares version from pkg-config using simple >=...

kmilos avatar Sep 06 '23 11:09 kmilos

@morsssss fyi

vapier avatar Sep 11 '23 15:09 vapier

Thanks for letting me know @vapier !

I admit I haven't worked with CMake since I worked on AVIF support here. If someone knows how to configure this properly, please do so. Otherwise I will get back into this when I get a spare hour or two...

morsssss avatar Sep 13 '23 17:09 morsssss

You can take a look at some Arch patches for example (not for gd though as it builds w/ Autotools there, but e.g. darktable and kimageformats): https://archlinux.org/todo/libavif-10/

kmilos avatar Sep 14 '23 08:09 kmilos

Hi, Fyi, This simple patch does the trick for me: https://github.com/nono303/win-build-scripts/blob/81072312071b5b4b2feaf639f01100b4bf8f4dfc/modules/libgd.patch#L21 (cmake compile file & work fine on Win vs17 x64)

nono303 avatar Nov 06 '23 08:11 nono303

Hi, Fyi, This simple patch does the trick for me: https://github.com/nono303/win-build-scripts/blob/81072312071b5b4b2feaf639f01100b4bf8f4dfc/modules/libgd.patch#L21 (cmake compile file & work fine on Win vs17 x64)

Thanks, with that patch I've been able to add CI for FreeBSD via Cirrus-CI: https://cirrus-ci.com/task/5194521131089920

emaste avatar Feb 04 '24 18:02 emaste