diff --git a/cmake-modules/AzureVcpkg.cmake b/cmake-modules/AzureVcpkg.cmake index d68103973..dd9a166cb 100644 --- a/cmake-modules/AzureVcpkg.cmake +++ b/cmake-modules/AzureVcpkg.cmake @@ -54,21 +54,13 @@ macro(az_vcpkg_portfile_prep targetName fileName contentToRemove) endmacro() macro(az_vcpkg_export targetName macroNamePart dllImportExportHeaderPath) - # The vcpkg.json file has an extra '#' in the comment section, because VcPkg can't handle an empty line at that position, - # and without that extra '#' line, the file contents look too crowded. - # Ultimately, the lines passed to az_vcpkg_portfile_prep() have to match the header comment that is actually - # present in the files, or otherwise nothing will be removed. - az_vcpkg_portfile_prep( - "${targetName}" - "vcpkg.json" - "# Copyright (c) Microsoft Corporation. All rights reserved.\n# SPDX-License-Identifier: MIT\n#\n" - ) - - az_vcpkg_portfile_prep( - "${targetName}" - "portfile.cmake" - "# Copyright (c) Microsoft Corporation. All rights reserved.\n# SPDX-License-Identifier: MIT\n\n" - ) + foreach(vcpkgFile "vcpkg.json" "portfile.cmake") + az_vcpkg_portfile_prep( + "${targetName}" + "${vcpkgFile}" + "# Copyright (c) Microsoft Corporation. All rights reserved.\n# SPDX-License-Identifier: MIT\n\n" + ) + endforeach() # Standard names for folders such as "bin", "lib", "include". We could hardcode, but some other libs use it too (curl). include(GNUInstallDirs) diff --git a/sdk/core/azure-core/vcpkg/vcpkg.json b/sdk/core/azure-core/vcpkg/vcpkg.json index f599f2dd9..ed805b953 100644 --- a/sdk/core/azure-core/vcpkg/vcpkg.json +++ b/sdk/core/azure-core/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-core-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/identity/azure-identity/vcpkg/vcpkg.json b/sdk/identity/azure-identity/vcpkg/vcpkg.json index fb96493fb..e55e7d2c2 100644 --- a/sdk/identity/azure-identity/vcpkg/vcpkg.json +++ b/sdk/identity/azure-identity/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-identity-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json b/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json index f35989ec8..7171a8d75 100644 --- a/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json +++ b/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-security-keyvault-common-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json b/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json index 3c5636f46..9bcc07013 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json +++ b/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-security-keyvault-keys-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json index 688dc8100..9e76fc1a9 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-storage-blobs-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json index 57823d518..4c9190a4a 100644 --- a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-storage-common-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json b/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json index b8bd6d23f..6928fc8e1 100644 --- a/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-storage-files-datalake-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json b/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json index 772bc56e6..c038d03dc 100644 --- a/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-storage-files-shares-cpp", "version-string": "@AZ_LIBRARY_VERSION@", diff --git a/sdk/template/azure-template/vcpkg/vcpkg.json b/sdk/template/azure-template/vcpkg/vcpkg.json index 478246b27..fbe60d920 100644 --- a/sdk/template/azure-template/vcpkg/vcpkg.json +++ b/sdk/template/azure-template/vcpkg/vcpkg.json @@ -1,6 +1,6 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -# + { "name": "azure-template-cpp", "version-string": "@AZ_LIBRARY_VERSION@",