From 59a347549339e6665ad1170cd65ac8e9ad085d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n?= Date: Mon, 3 Jul 2023 16:01:03 +0200 Subject: [PATCH] Add package_type=library to lib new --- conan/internal/api/new/autotools_lib.py | 1 + conan/internal/api/new/basic.py | 3 +++ conan/internal/api/new/bazel_lib.py | 1 + conan/internal/api/new/cmake_lib.py | 3 ++- conan/internal/api/new/meson_lib.py | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conan/internal/api/new/autotools_lib.py b/conan/internal/api/new/autotools_lib.py index b511f0bf885..8c0103d38a8 100644 --- a/conan/internal/api/new/autotools_lib.py +++ b/conan/internal/api/new/autotools_lib.py @@ -13,6 +13,7 @@ class {{package_name}}Conan(ConanFile): name = "{{name}}" version = "{{version}}" + package_type = "library" # Optional metadata license = "" diff --git a/conan/internal/api/new/basic.py b/conan/internal/api/new/basic.py index 66188ee408e..e726e83f606 100644 --- a/conan/internal/api/new/basic.py +++ b/conan/internal/api/new/basic.py @@ -15,6 +15,9 @@ def inject_get_or_else(variable, default): class BasicConanfile(ConanFile): ''' + _conanfile_header + '''\ + # Check the documentation for the rest of the available attributes + + # The requirements method allows you to define the dependencies of your recipe def requirements(self): # Each call to self.requires() will add the corresponding requirement diff --git a/conan/internal/api/new/bazel_lib.py b/conan/internal/api/new/bazel_lib.py index 9775a913795..f8ce5cea8ca 100644 --- a/conan/internal/api/new/bazel_lib.py +++ b/conan/internal/api/new/bazel_lib.py @@ -9,6 +9,7 @@ class {{package_name}}Recipe(ConanFile): name = "{{name}}" version = "{{version}}" + package_type = "library" # Binary configuration settings = "os", "compiler", "build_type", "arch" diff --git a/conan/internal/api/new/cmake_lib.py b/conan/internal/api/new/cmake_lib.py index 668b6eac16f..56ea6693571 100644 --- a/conan/internal/api/new/cmake_lib.py +++ b/conan/internal/api/new/cmake_lib.py @@ -5,6 +5,7 @@ class {{package_name}}Recipe(ConanFile): name = "{{name}}" version = "{{version}}" + package_type = "library" # Optional metadata license = "" @@ -286,7 +287,7 @@ def test(self): int main() { {{package_name}}(); - + std::vector vec; vec.push_back("test_package"); diff --git a/conan/internal/api/new/meson_lib.py b/conan/internal/api/new/meson_lib.py index b23a3f19f9d..bb38a6f746e 100644 --- a/conan/internal/api/new/meson_lib.py +++ b/conan/internal/api/new/meson_lib.py @@ -9,6 +9,7 @@ class {{package_name}}Conan(ConanFile): name = "{{name}}" version = "{{version}}" + package_type = "library" # Binary configuration settings = "os", "compiler", "build_type", "arch"