Closed sthen closed 2 years ago
btw this is with cmake 3.20.3 on OpenBSD
The problem (I think) is that the Jasper::Jasper imported target is not provided by pre-3.22 versions of CMake. This is my fault, however, not yours, as the CMakeLists.txt file for XV claims to only need CMake 3.12 (which is technically incorrect). Since many people are using older versions of CMake, I tried adding a workaround (based on your solution) that should define the Jasper::Jasper target when it doesn't get created in older CMake versions. Can you let me know if it works? If it doesn't perhaps you can make a pull request that tweaks it so it does? I cannot actually test my fix easily as I have new versions of CMake on all of my systems. My changes are in commit d84be152ca495f65837758b0fd06118d84646db5.
It does indeed work, thank you for the quick fix Michael.
Thanks for confirming that it works.
The cmake build fails for me. While the Jasper library is found, cmake's FindJasper module doesn't set the target, so "TARGET Jasper::Jasper" fails:
I'm not super-familiar with cmake but in the grand tradition of OS porters of copying/pasting/tweaking from other files until it builds, I came up with this by stealing bits of the FindJPEG module. Can't say if it's "correct" but it seems to work for me.