hzeller / timg

A terminal image and video viewer.
GNU General Public License v2.0
1.91k stars 73 forks source link

(On Distributions) make is possible to use the packaged qoi library. #97

Closed coldtobi closed 1 year ago

coldtobi commented 1 year ago

by:

hzeller commented 1 year ago

Looks good. For using the packaged headers in the distribution, would we need some flag in cmake to use the the local library, or do you rely on system search path finding it before the added -Ithird_party/ include path ?

While at it, it might be useful to do something similar to stb_image.h. Would you like to do that here or in a separate PR ?

coldtobi commented 1 year ago

Looks good. For using the packaged headers in the distribution, would we need some flag in cmake to use the the local library, or do you rely on system search path finding it before the added -Ithird_party/ include path ?

Good point. (For Debian I simply delete the file before building, but generally you're right that it might pick up the wrong one if it is not done…)

While at it, it might be useful to do something similar to stb_image.h. Would you like to do that here or in a separate PR ?

Another good point :) I though that it isn't packaged for Debian, but apparently it is… I'll investigate and take a look if it is possible to use it for timg and if so will provide an PR as well…

coldtobi commented 1 year ago

@hzeller Added some logic to detect if there is a system qoi.h before adding the include directory. To make things easier for stb later, I've moved qoi in its own directory.

Re: stb… stb is not used for the Debian package (as it is using Graphicsmagick.) So I'm going to defer that for now.

hzeller commented 1 year ago

Nice!