DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.74k stars 387 forks source link

Improve generated pkgconfig file and fix OPENJPEG include path #664

Closed autoantwort closed 1 year ago

autoantwort commented 1 year ago

Fixes:

[73/181] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DDEBUG -DHAVE_CONFIG_H -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean/src -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/arm64-osx-dbg/src -I/Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/arm64-osx/include -fPIC -g -Wall -Wextra -Werror=format-security -pedantic -Og -g3 -fdebug-prefix-map=/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean=. -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -MD -MT src/CMakeFiles/leptonica.dir/jp2kio.c.o -MF src/CMakeFiles/leptonica.dir/jp2kio.c.o.d -o src/CMakeFiles/leptonica.dir/jp2kio.c.o -c /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean/src/jp2kio.c
FAILED: src/CMakeFiles/leptonica.dir/jp2kio.c.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DDEBUG -DHAVE_CONFIG_H -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean/src -I/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/arm64-osx-dbg/src -I/Users/leanderSchulten/git_projekte/vcpkg/vcpkg_installed/arm64-osx/include -fPIC -g -Wall -Wextra -Werror=format-security -pedantic -Og -g3 -fdebug-prefix-map=/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean=. -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -MD -MT src/CMakeFiles/leptonica.dir/jp2kio.c.o -MF src/CMakeFiles/leptonica.dir/jp2kio.c.o.d -o src/CMakeFiles/leptonica.dir/jp2kio.c.o -c /Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean/src/jp2kio.c
/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/src/d2de327550-e088116e55.clean/src/jp2kio.c:115:10: fatal error: 'include/openjpeg.h' file not found
#include LIBJP2K_HEADER
         ^~~~~~~~~~~~~~
/Users/leanderSchulten/git_projekte/vcpkg/buildtrees/leptonica/arm64-osx-dbg/src/config_auto.h:43:24: note: expanded from macro 'LIBJP2K_HEADER'
#define LIBJP2K_HEADER <include/openjpeg.h>
                       ^~~~~~~~~~~~~~~~~~~~
<scratch space>:412:1: note: expanded from here
<include/openjpeg.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.

One should use Requires.private if you link against another projects that support pkg-config https://people.freedesktop.org/~dbn/pkg-config-guide.html#using