Closed wehlutyk closed 6 years ago
Hello, XPDF uses libpaper to pre-fill some missing parameters about the page dimensions, so if it's not installed it will give errors and this library is no mandatory.
In that case you still need to declare it in the CMake link libraries, don't you?
Ok I see now with your answer in kermitt2/pdfalto#2 "libpaper is not mandatory". Indeed! My point is that when libpaper is present on the system, some part of the build system finds it and tries to build xpdf with it, which fails because the target_link_libraries
are not set well. My changes don't make libpaper mandatory, they make so that it builds properly whether libpaper is present or not.
actually the problem is that the cmake function 'find_library', looks for libpaper and saves the path if it finds it in HAVE_PAPER_H otherwise it is set to NOTFOUND which lead to build fail, so a verification should be done with an if-else statement in cmake configuration, would you PR it please ?
I see, I can reproduce the build error when libpaper is not found. I just made the PR which for me works with and without libpaper present on the system.
Hi!
I was trying to build this on Arch Linux (where I have libpaper installed), and the build fails with:
Indeed, the Arch xpdf package has a patch (among others) to properly build with libpaper.
Adapting it to work with the fix of xpdf-qt target name made in 61eb5e40fb75be0628123b50d9b6f6344ebd2db4 makes this:
I can PR this if you want, but I haven't tested it when libpaper is not present (that would break my system). Is this an issue you've encountered?