Repository: conan-io/conan-center-index

Issue:
[package] sentry-native/0.4.9: qt option is broken
<!-- 
  Please don't forget to update the issue title.
  Include all applicable information to help us reproduce your problem.
-->

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **sentry-native/0.4.9**
  * Operating System+version: **MacOS 10.15**
  * Compiler+version: **apple clang 12**
  * Conan version: **conan 1.38.0**
  * Python version: **Python 3.9.4**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```toml
[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=12.0
compiler.libcxx=libc++
build_type=Release
[options]
[conf]
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)

`conan install . -b missing` fails with the following `conanfile.txt`:

```toml
[requires]
qt/5.15.2@
sentry-native/0.4.9@

[options]
sentry-native:qt=True
```

### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

sentry-native/0.4.9: Forced build from source
conanfile.txt: Installing package
Requirements
    brotli/1.0.9 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    double-conversion/3.1.5 from 'conancenter' - Cache
    freetype/2.10.4 from 'conancenter' - Cache
    libcurl/7.75.0 from 'conancenter' - Cache
    libiconv/1.16 from 'conancenter' - Cache
    libjpeg/9d from 'conancenter' - Cache
    libmysqlclient/8.0.25 from 'conancenter' - Cache
    libpng/1.6.37 from 'conancenter' - Cache
    libpq/13.2 from 'conancenter' - Cache
    lz4/1.9.3 from 'conancenter' - Cache
    odbc/2.3.9 from 'conancenter' - Cache
    opengl/system from 'conancenter' - Cache
    openssl/1.1.1k from 'conancenter' - Cache
    pcre2/10.37 from 'conancenter' - Cache
    qt/5.15.2 from 'conancenter' - Cache
    sentry-crashpad/0.4.9 from 'conancenter' - Cache
    sentry-native/0.4.9 from 'conancenter' - Cache
    sqlite3/3.35.5 from 'conancenter' - Cache
    zlib/1.2.11 from 'conancenter' - Cache
    zstd/1.5.0 from 'conancenter' - Cache
Packages
    brotli/1.0.9:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    bzip2/1.0.8:75fe66fbfe61230e9fcbb361f13b6b3baa483e0a - Cache
    double-conversion/3.1.5:6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6 - Cache
    freetype/2.10.4:f4924bd3b94e155cbf790d74ba3a3c29ccc81e89 - Cache
    libcurl/7.75.0:b5226bcfb80c62f6afd914990cba48fd26cb51ee - Cache
    libiconv/1.16:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    libjpeg/9d:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    libmysqlclient/8.0.25:97c732aa3dd032b38cd549bd7305e62dec344d85 - Cache
    libpng/1.6.37:88955cec2844f731470e07bd44ce5a3a24ec88b7 - Cache
    libpq/13.2:6615b55b95ff43a02a83c3955d071acd71dad079 - Cache
    lz4/1.9.3:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    odbc/2.3.9:5f4c4ed8ddf27bb70b22f93ac66b6827fc5411d1 - Cache
    opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    openssl/1.1.1k:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    pcre2/10.37:2d8245d819a6b7543095d62df5d99244060071ba - Cache
    qt/5.15.2:68b710d1797d9befbdc942f0c348ce14695c1e59 - Download
    sentry-crashpad/0.4.9:bb078796f1a4a051e0a904552096182e524f52b9 - Cache
    sentry-native/0.4.9:66d1fbad630e8933b28c8cceba736b74bd3a8df5 - Build
    sqlite3/3.35.5:264f180b28ff91ffa6d05e858eb8e55cc6c1a073 - Cache
    zlib/1.2.11:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
    zstd/1.5.0:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache

Installing (downloading, building) binaries...
qt/5.15.2: Retrieving package 68b710d1797d9befbdc942f0c348ce14695c1e59 from remote 'conancenter'
Downloading conanmanifest.txt completed [255.76k]
Downloading conaninfo.txt completed [7.58k]
Downloading conan_package.tgz completed [26283.61k]
Decompressing conan_package.tgz completed [0.00k]
qt/5.15.2: Package installed 68b710d1797d9befbdc942f0c348ce14695c1e59
qt/5.15.2: Downloaded package revision 0
brotli/1.0.9: Already installed!
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: /Users/martin/.conan/data/bzip2/1.0.8/_/_/package/75fe66fbfe61230e9fcbb361f13b6b3baa483e0a/bin
double-conversion/3.1.5: Already installed!
libiconv/1.16: Already installed!
libiconv/1.16: Appending PATH environment var: /Users/martin/.conan/data/libiconv/1.16/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/bin
libjpeg/9d: Already installed!
lz4/1.9.3: Already installed!
opengl/system: Already installed!
openssl/1.1.1k: Already installed!
sqlite3/3.35.5: Already installed!
sqlite3/3.35.5: Appending PATH env var with : /Users/martin/.conan/data/sqlite3/3.35.5/_/_/package/264f180b28ff91ffa6d05e858eb8e55cc6c1a073/bin
zlib/1.2.11: Already installed!
zstd/1.5.0: Already installed!
libcurl/7.75.0: Already installed!
libmysqlclient/8.0.25: Already installed!
libpng/1.6.37: Already installed!
libpq/13.2: Already installed!
odbc/2.3.9: Already installed!
odbc/2.3.9: Appending PATH environment variable: /Users/martin/.conan/data/odbc/2.3.9/_/_/package/5f4c4ed8ddf27bb70b22f93ac66b6827fc5411d1/bin
pcre2/10.37: Already installed!
pcre2/10.37: Appending PATH environment variable: /Users/martin/.conan/data/pcre2/10.37/_/_/package/2d8245d819a6b7543095d62df5d99244060071ba/bin
sentry-crashpad/0.4.9: Already installed!
sentry-crashpad/0.4.9: Appending PATH environment variable: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/bin
freetype/2.10.4: Already installed!
sentry-native/0.4.9: WARN: Build folder is dirty, removing it: /Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5
sentry-native/0.4.9: Copying sources to build folder
kwsentry-native/0.4.9: Building your package in /Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5
sentry-native/0.4.9: Generator cmake_find_package created FindCURL.cmake
sentry-native/0.4.9: Generator cmake_find_package created Findcrashpad.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindQt5.cmake
sentry-native/0.4.9: Generator cmake_find_package created Findpcre2.cmake
sentry-native/0.4.9: Generator cmake_find_package created Finddouble-conversion.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindFreetype.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindJPEG.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindSQLite3.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindMySQL.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindPostgreSQL.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindODBC.cmake
sentry-native/0.4.9: Generator cmake_find_package created Findopengl_system.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindOpenSSL.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindBZip2.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindPNG.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindBrotli.cmake
sentry-native/0.4.9: Generator cmake_find_package created Findzstd.cmake
sentry-native/0.4.9: Generator cmake_find_package created Findlz4.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindIconv.cmake
sentry-native/0.4.9: Generator cmake_find_package created FindZLIB.cmake
sentry-native/0.4.9: Generator cmake created conanbuildinfo.cmake
sentry-native/0.4.9: Calling build()
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Adjusting fPIC flag (ON)
-- Conan: C++ stdlib: libc++
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- SENTRY_TRANSPORT=curl
-- SENTRY_BACKEND=crashpad
-- SENTRY_LIBRARY_TYPE=STATIC
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Conan: Using autogenerated FindCURL.cmake
-- Found CURL: 7.75.0 (found version "7.75.0")
-- Library curl found /Users/martin/.conan/data/libcurl/7.75.0/_/_/package/b5226bcfb80c62f6afd914990cba48fd26cb51ee/lib/libcurl.a
-- Found: /Users/martin/.conan/data/libcurl/7.75.0/_/_/package/b5226bcfb80c62f6afd914990cba48fd26cb51ee/lib/libcurl.a
-- Conan: Using autogenerated FindZLIB.cmake
-- Found ZLIB: 1.2.11 (found version "1.2.11")
-- Library z found /Users/martin/.conan/data/zlib/1.2.11/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib/libz.a
-- Found: /Users/martin/.conan/data/zlib/1.2.11/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib/libz.a
-- Library curl found /Users/martin/.conan/data/libcurl/7.75.0/_/_/package/b5226bcfb80c62f6afd914990cba48fd26cb51ee/lib/libcurl.a
-- Found: /Users/martin/.conan/data/libcurl/7.75.0/_/_/package/b5226bcfb80c62f6afd914990cba48fd26cb51ee/lib/libcurl.a
-- Conan: Using autogenerated Findcrashpad.cmake
-- Found crashpad: 0.4.9 (found version "0.4.9")
-- Library crashpad_handler_lib found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_handler_lib.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_handler_lib.a
-- Library crashpad_minidump found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_minidump.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_minidump.a
-- Library crashpad_snapshot found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_snapshot.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_snapshot.a
-- Library crashpad_client found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_client.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_client.a
-- Library crashpad_util found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_util.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_util.a
-- Library mini_chromium found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libmini_chromium.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libmini_chromium.a
-- Library crashpad_tools found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_tools.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_tools.a
-- Conan: Dependency ZLIB already found
-- Library crashpad_tools found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_tools.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_tools.a
-- Library mini_chromium found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libmini_chromium.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libmini_chromium.a
-- Library crashpad_util found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_util.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_util.a
-- Library crashpad_client found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_client.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_client.a
-- Library crashpad_snapshot found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_snapshot.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_snapshot.a
-- Library crashpad_minidump found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_minidump.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_minidump.a
-- Library crashpad_handler_lib found /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_handler_lib.a
-- Found: /Users/martin/.conan/data/sentry-crashpad/0.4.9/_/_/package/bb078796f1a4a051e0a904552096182e524f52b9/lib/libcrashpad_handler_lib.a
Multiple versions of Qt found please set DESIRED_QT_VERSION
-- Configuring done
CMake Error at source_subfolder/CMakeLists.txt:214 (add_library):
  Target "sentry" links to target "qt::qt" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


CMake Generate step failed.  Build files cannot be regenerated correctly.
sentry-native/0.4.9:
sentry-native/0.4.9: ERROR: Package '66d1fbad630e8933b28c8cceba736b74bd3a8df5' build failed
sentry-native/0.4.9: WARN: Build folder /Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5
ERROR: sentry-native/0.4.9: Error in build() method, line 115
	cmake = self._configure_cmake()
while calling '_configure_cmake', line 109
	self._cmake.configure()
	ConanException: Error 1 while executing cd '/Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="12.0" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/Users/martin/.conan/data/sentry-native/0.4.9/_/_/package/66d1fbad630e8933b28c8cceba736b74bd3a8df5" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DSENTRY_BACKEND="crashpad" -DSENTRY_CRASHPAD_SYSTEM="True" -DSENTRY_ENABLE_INSTALL="True" -DSENTRY_TRANSPORT="curl" -DSENTRY_PIC="True" -DSENTRY_INTEGRATION_QT="True" -Wno-dev '/Users/martin/.conan/data/sentry-native/0.4.9/_/_/build/66d1fbad630e8933b28c8cceba736b74bd3a8df5'
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py
--- a/recipes/sentry-native/all/conanfile.py
+++ b/recipes/sentry-native/all/conanfile.py
@@ -16,7 +16,7 @@ class SentryNativeConan(ConanFile):
     topics = ("conan", "breakpad", "crashpad",
               "error-reporting", "crash-reporting")
     exports_sources = ["CMakeLists.txt", "patches/*"]
-    generators = "cmake", "cmake_find_package", "pkg_config"
+    generators = "cmake", "cmake_find_package", "cmake_find_package_multi", "pkg_config"
     settings = "os", "arch", "compiler", "build_type"
     options = {
         "shared": [True, False],


Test patch: