bluescan / tacentview

An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.
ISC License
369 stars 34 forks source link

Use `FIND_PACKAGE_ARGS` in `FetchContent_Declare` #175

Closed poperigby closed 3 months ago

poperigby commented 3 months ago

Hi, I'm trying to package this program for NixOS, but I'm unable to because of the way the FetchContent is setup in this project's CMakeLists.txt. Nix prevents reaching out to the internet during build operations, to keep things reproducible. If you just added FIND_PACKAGE_ARGS NAMES tacent to CMakeLists.txt, as is described here, then the Nix package would be able to provide the Tacent dependency with no problem.

bluescan commented 3 months ago

Hi poperigby. Nice to (potentially) see a package for NixOS.

I don't claim to fully understand where the tacent library dependency would be found by a find_package() call but I imagine you know more about accomplishing this than I do ;)

Try 6e642f85b3d4d716f310b6d56aa13c028f043ab3. Note that the tacent library must be at e823e1798b3833e34802bbd21c0c9401e0d40973 or later for things to work properly. I generally comment out the GIT_TAG line while developing but always set it explicitly before a release.

If no problems feel free to close the issue.

poperigby commented 3 months ago

Seems to work perfectly, thank you! The package should be done fairly soon. Just trying to debug some of the build steps.