I'm using Visual Studio 2017 with the vcpkg integration to build my projects.
The vcpkg/scripts/buildsystems/msbuild/vcpkg.targets file is of version #3504, 8. Aug. 2018.
Besides the well known build configurations Debug and Release, I also use other names that prefix or suffix additional words, like Test Debug or Debug CLR. In my project settings, I examine the configuraion name to automatically adjust certain project settings.
The problem with vcpkg is that the condition $(VcpkgConfiguration.StartsWith('Debug')) does match some cases, but not all. Also, creating the property $(VcpkgNormalizedConfiguration) as string and examining it later just to add a sub directory is more verbose than necessary.
I'd like to propose the following:
- Create a property
$(VcpkgConfigSubdir) that is 'debug\' if the configuration contains 'Debug' (case-insensitive) and is empty in all other cases.
- Remove lot's of redundant code by inserting
$(VcpkgConfigSubdir) into the strings.
- Remove the error message "Vcpkg is unable to link because we cannot decide between Release and Debug libraries." because
$(VcpkgConfigSubdir) will always be defined and the test cannot fail anymore.
I have prepared a modified version of vcpkg.targets that works very well that I'd like to submit.
I'm using Visual Studio 2017 with the vcpkg integration to build my projects.
The
vcpkg/scripts/buildsystems/msbuild/vcpkg.targetsfile is of version #3504, 8. Aug. 2018.Besides the well known build configurations
DebugandRelease, I also use other names that prefix or suffix additional words, likeTest DebugorDebug CLR. In my project settings, I examine the configuraion name to automatically adjust certain project settings.The problem with vcpkg is that the condition
$(VcpkgConfiguration.StartsWith('Debug'))does match some cases, but not all. Also, creating the property$(VcpkgNormalizedConfiguration)as string and examining it later just to add a sub directory is more verbose than necessary.I'd like to propose the following:
$(VcpkgConfigSubdir)that is'debug\'if the configuration contains'Debug'(case-insensitive) and is empty in all other cases.$(VcpkgConfigSubdir)into the strings.$(VcpkgConfigSubdir)will always be defined and the test cannot fail anymore.I have prepared a modified version of
vcpkg.targetsthat works very well that I'd like to submit.