You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[docs] Recipe templates with Conan 2.x support only (#25849)
* [docs] package_templates: demo non-list conandata URLs as well
* [docs] autotools: do not use `-nologo` for AR with MSVC
It keeps the logs slightly cleaner for a very infrequent command but has caused issues with "ar interface detection" in ./configure for several recipes.
* [docs] autotools: provide tool_requires() versions
These change very infrequently (except for pkgconf, somewhat). I think these can be included for convenience.
* [docs] autotools: mention a common workaround for MSVC
* [docs] cmake: improve recipe example
* [docs] package_templates: update the conventional LicenseRef format
* [docs] package_templates: improve package_type comment
* [docs] package_templates: various minor improvements
* [docs] package_templates: remove outdated test_package comment
* [docs] meson: bump versions in template
* [docs] package_templates: add a version range example
* [docs] package_templates: improve transitive_headers=True examples
* [docs] autotools: improve AutotoolsDeps workaround comment
* [docs] autotools: revert to x.y.z tool versions
* [docs] package_templates: remove outdated CMakeLists.txt comment
* [docs] package_templates: add layout to prebuilt_tool_package test_package
The test_package directory gets gunked up with generated VirtualBuildEnv files otherwise.
* [docs] package_templates: fix some typos
* Move CMake and and PkgConfig properties to the top, drop legacy generator props
The CMake and PkgConfig info is the most relevant part to any consumers and should come first, imo.
New recipes should not bother with the legacy generators, especially after test_v1_package is no longer included.
* Simplify Cmake template
Signed-off-by: Uilian Ries <[email protected]>
* Simplify header-only template
Signed-off-by: Uilian Ries <[email protected]>
* Simplify header-only template
Signed-off-by: Uilian Ries <[email protected]>
* Move patches to source
Signed-off-by: Uilian Ries <[email protected]>
* Simplify autotools template
Signed-off-by: Uilian Ries <[email protected]>
* Simplify meson template
Signed-off-by: Uilian Ries <[email protected]>
* Simplify msbuild template
Signed-off-by: Uilian Ries <[email protected]>
* Simplify prebuilt template
Signed-off-by: Uilian Ries <[email protected]>
* Grammar typo
Signed-off-by: Uilian Ries <[email protected]>
* Use cxx language by default on test package
Signed-off-by: Uilian Ries <[email protected]>
* Remove VirtuanEnvs from test package
Signed-off-by: Uilian Ries <[email protected]>
* Update test package comment
Signed-off-by: Uilian Ries <[email protected]>
* Remove VirtuanEnvs - They are automatic
Signed-off-by: Uilian Ries <[email protected]>
* Comment update
Co-authored-by: Daniel <[email protected]>
* Comment update
Co-authored-by: Daniel <[email protected]>
* Comment update
Co-authored-by: Daniel <[email protected]>
* Comment update
Co-authored-by: Daniel <[email protected]>
* Comment how to install
---------
Signed-off-by: Uilian Ries <[email protected]>
Co-authored-by: Martin Valgur <[email protected]>
Co-authored-by: Daniel <[email protected]>
# Using patches is always the last resort to fix issues. If possible, try to fix the issue in the upstream project.
102
+
apply_conandata_patches(self)
121
103
122
104
defgenerate(self):
123
-
# inject tool_requires env vars in build scope (not needed if there is no tool_requires)
124
-
env=VirtualBuildEnv(self)
125
-
env.generate()
126
-
# inject requires env vars in build scope
105
+
# inject required env vars into the build scope
127
106
# it's required in case of native build when there is AutotoolsDeps & at least one dependency which might be shared, because configure tries to run a test executable
128
107
ifnotcross_building(self):
129
-
env=VirtualRunEnv(self)
130
-
env.generate(scope="build")
131
-
# --fpic is automatically managed when 'fPIC'option is declared
108
+
VirtualRunEnv(self).generate(scope="build")
109
+
# --fpic is automatically managed when 'fPIC' option is declared
132
110
# --enable/disable-shared is automatically managed when 'shared' option is declared
133
111
tc=AutotoolsToolchain(self)
134
112
# autotools usually uses 'yes' and 'no' to enable/disable options
@@ -143,8 +121,10 @@ def yes_no(v): return "yes" if v else "no"
143
121
tc=PkgConfigDeps(self)
144
122
tc.generate()
145
123
# generate dependencies for autotools
146
-
tc=AutotoolsDeps(self)
147
-
tc.generate()
124
+
# some recipes might require a workaround for MSVC (https://github.com/conan-io/conan/issues/12784):
0 commit comments