summaryrefslogtreecommitdiffstats
path: root/conanfile.py
Commit message (Collapse)AuthorAgeFilesLines
* Add conanfile.py to support builds with Conan package managerIikka Eklund2021-05-241-0/+460
Initial version of the conanfile.py to support builds with Conan package manager. Tested with Linux, macOS and Windows desktop builds first. Use 'scm' revision_mode so that the revision matches with the git commit id. The recipe uses Qt's configure(.bat) and cmake directly, 'conans.CMake' utility tool is not used. Load options dynamically based on configure(.bat) features: - configure(.bat) -write-options-for-conan <output file> - Expose all usable configure(.bat) options as Conan options - We want to query configure(.bat) for available options and features to avoid duplicating these in multiple places - The available configure(.bat) option names are formatted to suit as dictionary keys in Conan 'options' The recipe writes 'configure_options.json' and 'configure_features.txt' which are exported as part of the conan package. This is done only once during the 'conan export' i.e. when the initial Conan package is being created. The recipe will reference these files in later phases when needed. The recipe translates the Qt configure options and features as Conan options and default_options. When the build is invoked ('conan install') the recipe translates the Conan options back to suitable Qt configure options which are then passed to configure(.bat). Additional cmake flags can be passed via 'extra_cmake_args' option: $conan install ... -o extra_cmake_args="-DFOO=bar -DFOO2=bar2" Remove those options from 'package_id' that point to local environment like installation paths. These are most probably different on end user machines making it impossible to re-use the pre-built binaries by Qt CI as the path values would become of the 'package_id' checksum. Task-number: QTBUG-92031 Change-Id: I4e47d116fdef6a5daa23aba22bac2b2d74d12c6e Reviewed-by: Toni Saario <toni.saario@qt.io>