Skip to content

Commit

Permalink
Add package_type=library to lib new (#14215)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS authored Jul 4, 2023
1 parent ae001d3 commit 07cfcc3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions conan/internal/api/new/autotools_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class {{package_name}}Conan(ConanFile):
name = "{{name}}"
version = "{{version}}"
package_type = "library"
# Optional metadata
license = "<Put the package license here>"
Expand Down
3 changes: 3 additions & 0 deletions conan/internal/api/new/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions conan/internal/api/new/bazel_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class {{package_name}}Recipe(ConanFile):
name = "{{name}}"
version = "{{version}}"
package_type = "library"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
Expand Down
3 changes: 2 additions & 1 deletion conan/internal/api/new/cmake_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class {{package_name}}Recipe(ConanFile):
name = "{{name}}"
version = "{{version}}"
package_type = "library"
# Optional metadata
license = "<Put the package license here>"
Expand Down Expand Up @@ -286,7 +287,7 @@ def test(self):
int main() {
{{package_name}}();
std::vector<std::string> vec;
vec.push_back("test_package");
Expand Down
1 change: 1 addition & 0 deletions conan/internal/api/new/meson_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class {{package_name}}Conan(ConanFile):
name = "{{name}}"
version = "{{version}}"
package_type = "library"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
Expand Down

0 comments on commit 07cfcc3

Please sign in to comment.