Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix msbuild_lib template with static-library #15807

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conan/internal/api/new/msbuild_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class {{package_name}}Conan(ConanFile):
version = "{{version}}"

# Binary configuration
package_type = "static-library" # hardcoded in .vcxproj
settings = "os", "compiler", "build_type", "arch"

# Sources are located in the same place as this recipe, copy them to the recipe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ def test_msbuild_lib_2022():
client.run("create . -s compiler.version=191 -c tools.microsoft.msbuild:vs_version=17")
assert "hello/0.1: Hello World Release!" in client.out
# This is the default compiler.version=191 in conftest
assert "Visual Studio 2022" in client.out
assert "Activating environment Visual Studio 17" in client.out
assert "hello/0.1: _MSC_VER191" in client.out

# Create works
client.run("create . -s compiler.version=193")
assert "hello/0.1: Hello World Release!" in client.out
# This is the default compiler.version=191 in conftest
assert "Visual Studio 2022" in client.out
assert "Activating environment Visual Studio 17" in client.out
assert "hello/0.1: _MSC_VER193" in client.out


Expand Down