Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] qt/5.15.2: Recipe does not support CMakeDeps since conan 1.43.2 #9381

Closed
jt416 opened this issue Feb 14, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@jt416
Copy link

jt416 commented Feb 14, 2022

Conan 1.43.1 and earlier would generate qt-config.cmake successfully for CMakeDeps generator and a project could find and use the package as qt::qt in cmake.

Conan 1.43.2 and newer fails because the build modules and builddirs are not fully defined (not setting properties).

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: qt/5.15.2
  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 16
  • Docker image: conanio/gcc8
  • Conan version: conan 1.45.0
  • Python version: Python 3.7.8

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

PS C:\MyProj> conan profile show default
Configuration for profile default:

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Release
[options]
[conf]
[build_requires]
[env]
PS C:\MyProj> conan profile show default_build
Configuration for profile default_build:

[settings]
os_build=Windows
arch_build=x86_64
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

conanfile.txt:
[requires]
qt/5.15.2
[generators]
CMakeDeps

CMakeList.txt:
find_package(qt CONFIG REQUIRED)

Logs (Include/Attach if Applicable)

Click to expand log
PS C:\MyProj> cd out
PS C:\MyProj\out> conan install ..
Configuration (profile_host):
[settings]
arch=x86_64
build_type=Release    
compiler=Visual Studio
compiler.runtime=MD   
compiler.toolset=v141 
compiler.version=16   
os=Windows
[options]
[build_requires]      
[env]
[conf]

Configuration (profile_build):
[settings]
arch_build=x86_64
os_build=Windows
[options]
[build_requires]
[env]
[conf]

conanfile.py (myproj/None): Installing package
Requirements
    brotli/1.0.9 from 'thirdparty-conan-approved-local' - Cache
    bzip2/1.0.8 from 'thirdparty-conan-approved-local' - Cache
    double-conversion/3.1.5 from 'thirdparty-conan-approved-local' - Cache
    freetype/2.10.4 from 'thirdparty-conan-approved-local' - Cache
    libjpeg/9d from 'thirdparty-conan-approved-local' - Cache
    libpng/1.6.37 from 'thirdparty-conan-approved-local' - Cache
    libpq/12.2 from 'thirdparty-conan-approved-local' - Cache
    opengl/system from 'thirdparty-conan-approved-local' - Cache
    openssl/1.1.1j from 'thirdparty-conan-approved-local' - Cache
    pcre2/10.35 from 'thirdparty-conan-approved-local' - Cache
    qt/5.15.2 from 'thirdparty-conan-approved-local' - Cache
    sqlite3/3.33.0 from 'thirdparty-conan-approved-local' - Cache
    zlib/1.2.11 from 'thirdparty-conan-approved-local' - Cache
    zstd/1.4.8 from 'thirdparty-conan-approved-local' - Cache
Packages
    brotli/1.0.9:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    bzip2/1.0.8:5be2b7a2110ec8acdbf9a1cea9de5d60747edb34 - Cache
    double-conversion/3.1.5:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    freetype/2.10.4:48d0120dc306b44fcc074dbed3143a1cab49596c - Cache
    libjpeg/9d:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    libpng/1.6.37:606fdb601e335c2001bdf31d478826b644747077 - Cache
    libpq/12.2:66397d4e4f72ab2f3a4c316d3e5132059c9ebf7b - Cache
    opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    openssl/1.1.1j:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    pcre2/10.35:31f45505432ffab2d4197cb33cc213fd6458cb33 - Cache
    qt/5.15.2:46f92d37ab26e762430152488269bb7a97cd7a0b - Cache
    sqlite3/3.33.0:baa6c07abb3a821cd4da5aba2812747bf22c81ea - Cache
    zlib/1.2.11:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache
    zstd/1.4.8:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Cache

Cross-build from 'None:None' to 'Windows:x86_64'
Installing (downloading, building) binaries...
brotli/1.0.9: Already installed!
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: C:\Users\jthien\.conan\data\bzip2\1.0.8\_\_\package\5be2b7a2110ec8acdbf9a1cea9de5d60747edb34\bin
double-conversion/3.1.5: Already installed!
libjpeg/9d: Already installed!
opengl/system: Already installed!
openssl/1.1.1j: Already installed!
sqlite3/3.33.0: Already installed!
sqlite3/3.33.0: Appending PATH env var with : C:\Users\jthien\.conan\data\sqlite3\3.33.0\_\_\package\baa6c07abb3a821cd4da5aba2812747bf22c81ea\bin
zlib/1.2.11: Already installed!
zstd/1.4.8: Already installed!
libpng/1.6.37: Already installed!
libpq/12.2: Already installed!
pcre2/10.35: Already installed!
pcre2/10.35: Appending PATH environment variable: C:\Users\jthien\.conan\data\pcre2\10.35\_\_\package\31f45505432ffab2d4197cb33cc213fd6458cb33\bin
freetype/2.10.4: Already installed!
qt/5.15.2: Already installed!
conanfile.py (myproj/None): Generator 'CMakeDeps' calling 'generate()'
conanfile.py (myproj/None): Generator 'CMakeToolchain' calling 'generate()'
conanfile.py (myproj/None): Generator txt created conanbuildinfo.txt
conanfile.py (myproj/None): Aggregating env generators
conanfile.py (myproj/None): Generated conaninfo.txt
conanfile.py (myproj/None): Generated graphinfo
PS C:\MyProj\out> cd ..
PS C:\MyProj> cmake --preset x64-windows
Preset CMake variables:

  CMAKE_INSTALL_PREFIX="C:/MyProj/out/install/x64-windows"
  CMAKE_SYSTEM_VERSION="10.0.17134.0"
  CMAKE_TOOLCHAIN_FILE="C:/MyProj/out/conan/conan_toolchain.cmake"

Using Conan toolchain: C:/MyProj/out/conan/conan_toolchain.cmake.
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.17134.0.
-- Conan: Target declared 'qt::qt'
-- Conan: Target declared 'zlib::zlib'
-- Conan: Component target declared 'openssl::crypto'
-- Conan: Component target declared 'openssl::ssl'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Component target declared 'pcre2::pcre2-8'
-- Conan: Component target declared 'pcre2::pcre2-posix'
-- Conan: Component target declared 'pcre2::pcre2-16'
-- Conan: Component target declared 'pcre2::pcre2-32'
-- Conan: Target declared 'pcre2::pcre2'
-- Conan: Target declared 'bzip2::bzip2'
-- Conan: Target declared 'double-conversion::double-conversion'
-- Conan: Target declared 'freetype::freetype'
-- Conan: Target declared 'libpng::libpng'
-- Conan: Component target declared 'brotli::brotlicommon'
-- Conan: Component target declared 'brotli::brotlidec'
-- Conan: Component target declared 'brotli::brotlienc'
-- Conan: Target declared 'brotli::brotli'
-- Conan: Target declared 'libjpeg::libjpeg'
-- Conan: Component target declared 'sqlite3::sqlite'
-- Conan: Target declared 'sqlite3::sqlite3'
-- Conan: Component target declared 'libpq::pgcommon'
-- Conan: Component target declared 'libpq::pgport'
-- Conan: Component target declared 'libpq::pq'
-- Conan: Target declared 'libpq::libpq'
-- Conan: Target declared 'opengl::opengl'
-- Conan: Component target declared 'zstd::zstdlib'
-- Conan: Target declared 'zstd::zstd'
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target MyProj.  AUTOMOC, AUTOUIC
  and AUTORCC disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Widgets)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/MyProj/out
PS C:\MyProj> 
@jt416 jt416 added the bug Something isn't working label Feb 14, 2022
@jt416
Copy link
Author

jt416 commented Feb 14, 2022

I have a fix to contribute in a PR shortly.

Should I maintain the cmake target name qt::qt for backward compatibility? Should I migrate toward Qt5 target name?

@SpaceIm
Copy link
Contributor

SpaceIm commented Feb 14, 2022

Will be fixed in #9337

@ericLemanissier
Copy link
Contributor

this issue has been fixed

@SSE4 SSE4 closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants