Qt 6: Qt Image Formats - enable tiff compilation
-
Hi there,
I'd like to build the Qt Image Formats (6.0.0) including the TIFF support. How do I enable the TIFF compilation.
➜ pwd /Users/duda/Qt/AdditionalLibraries/Qt/qtimageformats-6.0.0/Src ➜ conan install . --build=missing --profile=/Users/duda/Qt/Tools/Conan/profiles/qt-6.0.0-macx-clang -s build_type=Release -g cmake_paths -g=cmake -g deploy Configuration: [settings] arch=x86_64 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=11.0 os=Macos [options] qt6=6.0.0 [build_requires] [env] QT_PATH=/Users/duda/Qt/6.0.0/clang_64 conanfile.py (qtimageformats/6.0.0): Installing package Requirements Packages Installing (downloading, building) binaries... conanfile.py (qtimageformats/6.0.0): Generator cmake_paths created conan_paths.cmake conanfile.py (qtimageformats/6.0.0): Generator deploy created deploy_manifest.txt conanfile.py (qtimageformats/6.0.0): Generator txt created conanbuildinfo.txt conanfile.py (qtimageformats/6.0.0): Generator cmake created conanbuildinfo.cmake conanfile.py (qtimageformats/6.0.0): Generated conaninfo.txt conanfile.py (qtimageformats/6.0.0): Generated graphinfo
➜ ~/Qt/Tools/Conan/conan build . Using lockfile: '/Users/duda/Qt/AdditionalLibraries/Qt/qtimageformats-6.0.0/Src/conan.lock' Using cached profile from lockfile conanfile.py (qtimageformats/6.0.0): Calling build() CMAKE_PREFIX_PATH for 'qtimageformats/6.0.0' build is: /Users/duda/Qt/6.0.0/clang_64 CMAKE_PREFIX_PATH for 'qtimageformats/6.0.0' build is: /Users/duda/Qt/6.0.0/clang_64 -- The CXX compiler identification is AppleClang 12.0.0.12000032 -- The C compiler identification is AppleClang 12.0.0.12000032 ... -- Could NOT find JPEG (missing: JPEG_LIBRARY) (found version "80") -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES) -- Could NOT find TIFF (missing: TIFF_LIBRARY) (found version "4.0.9") -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find WebP (missing: WebP_INCLUDE_DIR WebP_LIBRARY WebP_demux_INCLUDE_DIR WebP_demux_LIBRARY WebP_mux_INCLUDE_DIR WebP_mux_LIBRARY) ... * Qt6BuildInternals * Qt6CoreTools (required version >= 6.0.0) * Qt6Core * OpenGL * Qt6GuiTools (required version >= 6.0.0) * Qt6Gui * Qt6 (required version >= 6.0.0) -- The following OPTIONAL packages have not been found: * JPEG * Jasper * WrapJasper * TIFF * PkgConfig * WrapWebP Configure summary: Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... no Using system libtiff ................. no WEBP ................................... no Using system libwebp ................. no
I am using the BigSur (Intel) for compilation and can't find out how can I enable the TIFF compilation. I see that the libtiff sources are bundled in the qtimageformats. I also have the system libtiff installed.
➜ pkg-config --static --libs libtiff-4 -L/usr/local/Cellar/libtiff/4.1.0_1/lib -ltiff -ljpeg -lz ➜ pkg-config --static --cflags-only-I libtiff-4 -I/usr/local/Cellar/libtiff/4.1.0_1/include
Could you point me on the right way in my investigation?
Thanks a lot!
-
Hi and welcome to devnet,
Did you check the test logs to see exactly what failed ?
-
Could you point me to the file I am supposed to check?
I would say that I need to somehow instruct conan to set the
QT_FEATURE_tiff:INTERNAL
and theFEATURE_tiff:BOOL
toon
.➜ Src grep tiff * -R | more CMakeCache.txt:// Using system libtiff CMakeCache.txt:FEATURE_system_tiff:BOOL=OFF CMakeCache.txt:FEATURE_tiff:BOOL=OFF CMakeCache.txt:INPUT_tiff:STRING=undefined CMakeCache.txt://STRINGS property for variable: INPUT_tiff CMakeCache.txt:INPUT_tiff-STRINGS:INTERNAL=undefined;no;qt;system CMakeCache.txt:QT_FEATURE_LABEL_system_tiff:INTERNAL= Using system libtiff CMakeCache.txt:QT_FEATURE_LABEL_tiff:INTERNAL=TIFF CMakeCache.txt://Qt feature: system_tiff CMakeCache.txt:QT_FEATURE_system_tiff:INTERNAL=OFF CMakeCache.txt://Qt feature: tiff CMakeCache.txt:QT_FEATURE_tiff:INTERNAL=OFF
-
-
@SGaist Thank you very much, that helped!
I had to update the
conanfile.py
because I do not know how to pass the required arguments to cmake via conan CLI.And it really works - the bundled libtiff is now being built including the Qt TIFF plugin!!!
-
Are you using the just released 6.0.0 sources ?
-
@SGaist Yes, all installed via the Qt installer.
-
@SGaist Just tried to build the same module on the Windows machine and I would say that Qt might have a bug inside.
There is no Release configuration, I had to specify the RelWithDebInfo.
conan install .. --build=missing --profile=C:\Qt\Tools\Conan\profiles\qt-6.0.0-msvc2019_64 -s build_type=RelWithDebInfo -g cmake_paths -g=cmake -g deploy -o qtimageformats:shared=True