This commit is contained in:
Anton Kolesnyk 2020-12-11 11:53:37 -08:00 коммит произвёл GitHub
Родитель c22392e943
Коммит 3eae7c130c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
33 изменённых файлов: 558 добавлений и 28 удалений

Просмотреть файл

@ -4,6 +4,9 @@
cmake_minimum_required (VERSION 3.13)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
# Variable to indicate whether the entire SDK is being built, as opposed to an individual library.
set(AZ_ALL_LIBRARIES ON)
# Compile Options
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" ON)
option(BUILD_TRANSPORT_CURL "Build an HTTP transport implementation with CURL" OFF)

Просмотреть файл

@ -67,7 +67,7 @@ endif()
# Target must already exist
macro(add_gtest TESTNAME)
target_link_libraries(${TESTNAME} PUBLIC gtest gmock gtest_main)
target_link_libraries(${TESTNAME} PRIVATE gtest gmock gtest_main)
if(GOOGLE_TEST_INDIVIDUAL)
if(CMAKE_VERSION VERSION_LESS 3.10)

Просмотреть файл

@ -0,0 +1,85 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
# We need to know an absolute path to our repo root to do things like referencing ./LICENSE.txt file.
set(AZ_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
macro(az_vcpkg_integrate)
# VCPKG Integration
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
elseif(DEFINED ENV{VCPKG_INSTALLATION_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
endif()
if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
endif()
endmacro()
macro(az_vcpkg_export targetName)
# Produce the files to help with the VcPkg release.
# Go to the /out/build/<cfg>/vcpkg directory, and copy (merge) "ports" folder to the vcpkg repo.
# Then, update portfile.cmake's SHA512 from "1" to the actual hash (a good way to do it is to uninstall a package,
# clean vcpkg/downloads, vcpkg/buildtrees, run "vcpkg install <pkg>", and get the SHA from the error message).
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/CONTROL" "${CMAKE_BINARY_DIR}/vcpkg/ports/${targetName}-cpp/CONTROL" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/portfile.cmake" "${CMAKE_BINARY_DIR}/vcpkg/ports/${targetName}-cpp/portfile.cmake" @ONLY)
# Standard names for folders such as "bin", "lib", "include". We could hardcode, but some other libs use it too (curl).
include(GNUInstallDirs)
# When installing, copy our "inc" directory (headers) to "include" directory at the install location.
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/inc/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# Copy license as "copyright" (vcpkg dictates naming and location).
install(FILES "${AZ_ROOT_DIR}/LICENSE.txt" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${targetName}-cpp" RENAME "copyright")
# Indicate where to install targets. Mirrors what other ports do.
install(
TARGETS "${targetName}"
EXPORT "${targetName}-cppTargets"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # DLLs (if produced by build) go to "/bin"
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # static .lib files
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # .lib files for DLL build
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # headers
)
# Export the targets file itself.
install(
EXPORT "${targetName}-cppTargets"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${targetName}-cpp"
NAMESPACE Azure:: # Not the C++ namespace, but a namespace in terms of cmake.
FILE "${targetName}-cppTargets.cmake"
)
# configure_package_config_file(), write_basic_package_version_file()
include(CMakePackageConfigHelpers)
# Produce package config file.
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/Config.cmake.in"
"${targetName}-cppConfig.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${targetName}-cpp"
PATH_VARS
CMAKE_INSTALL_LIBDIR)
# Produce version file.
write_basic_package_version_file(
"${targetName}-cppConfigVersion.cmake"
VERSION ${AZ_LIBRARY_VERSION} # the version that we extracted from version.hpp
COMPATIBILITY SameMajorVersion
)
# Install package cofig and version files.
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${targetName}-cppConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${targetName}-cppConfigVersion.cmake"
DESTINATION
"${CMAKE_INSTALL_DATAROOTDIR}/${targetName}-cpp" # to shares/<our_pkg>
)
# Export all the installs above as package.
export(PACKAGE "${targetName}-cpp")
endmacro()

Просмотреть файл

@ -10,12 +10,15 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
find_package(Threads REQUIRED)
# min version for `CURLSSLOPT_NO_REVOKE`
@ -100,23 +103,26 @@ target_include_directories(
azure-core
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include/az_core>
$<INSTALL_INTERFACE:include>
)
# make sure that users can consume the project as a library.
add_library(Azure::Core ALIAS azure-core)
add_library(Azure::azure-core ALIAS azure-core)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(core azure-core "azure-core-test")
create_code_coverage(core azure-core azure-core-test)
# ${CURL_INCLUDE_DIRS} needs to be public as long as we #include<curl.h> in public headers.
target_include_directories(azure-core PUBLIC ${CURL_INCLUDE_DIRS})
target_include_directories(azure-core INTERFACE ${nlohmann_json_INCLUDE_DIRS})
target_link_libraries(azure-core INTERFACE CURL::libcurl Threads::Threads nlohmann_json::nlohmann_json)
if(BUILD_TRANSPORT_WINHTTP)
SET(WIN_HTTP_LIB Winhttp.lib)
target_link_libraries(azure-core PRIVATE ${WIN_HTTP_LIB})
endif()
target_link_libraries(azure-core PRIVATE CURL::libcurl ${WIN_HTTP_LIB} Threads::Threads)
target_link_libraries(azure-core INTERFACE nlohmann_json::nlohmann_json)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/core/version.hpp")
generate_documentation(azure-core ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-core)

Просмотреть файл

@ -9,6 +9,7 @@
#include <string>
#include <winhttp.h>
using Azure::Core::Context;
using namespace Azure::Core::Http;
namespace {

Просмотреть файл

@ -0,0 +1,15 @@
Source: azure-core-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: curl, nlohmann-json
Description: Microsoft Azure Core SDK for C++
This library provides shared primitives, abstractions, and helpers for modern Azure SDK client libraries written in the C++.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/core/azure-core
Supports: !uwp
Default-Features: curl
Feature: curl
Description: Build an HTTP transport implementation with LibCURL
Feature: winhttp
Build-Depends: azure-core-cpp[core] (windows)
Description: Build an HTTP transport implementation with WinHTTP

Просмотреть файл

@ -0,0 +1,15 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(nlohmann_json @NLOHMANN_JSON_MIN_REQUIRED_VERSION@)
if(@BUILD_TRANSPORT_CURL@)
find_dependency(CURL @CURL_MIN_REQUIRED_VERSION@)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/azure-core-cppTargets.cmake")
check_required_components("azure-core-cpp")

Просмотреть файл

@ -0,0 +1,32 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-core_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
curl BUILD_TRANSPORT_CURL
winhttp BUILD_TRANSPORT_WINHTTP
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/core/azure-core/
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-core-cpp CONFIG QUIET)
if(NOT azure-core-cpp_FOUND)
find_package(azure-core-cpp REQUIRED)
endif()
endif()
set(
AZURE_IDENTITY_HEADER
inc/azure/identity/client_secret_credential.hpp
@ -34,15 +44,23 @@ set(
add_library(azure-identity ${AZURE_IDENTITY_HEADER} ${AZURE_IDENTITY_SOURCE})
# make sure that users can consume the project as a library.
add_library(azure::identity ALIAS azure-identity)
add_library(Azure::azure-identity ALIAS azure-identity)
# Uncomment once identity have tests
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
# create_code_coverage(identity azure-identity azure-identity-test)
target_include_directories(azure-identity PUBLIC inc)
target_include_directories(
azure-identity
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-core-cpp_INCLUDE_DIRS}
)
target_link_libraries(azure-identity PUBLIC azure-core)
target_link_libraries(azure-identity PUBLIC Azure::azure-core)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/identity/version.hpp")
generate_documentation(azure-identity ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-identity)

Просмотреть файл

@ -0,0 +1,7 @@
Source: azure-identity-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-core-cpp
Description: Microsoft Azure Identity SDK for C++
This library provides common authentication-related abstractions for Azure SDK.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/identity/azure-identity
Supports: !uwp

Просмотреть файл

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-core-cpp)
include("${CMAKE_CURRENT_LIST_DIR}/azure-identity-cppTargets.cmake")
check_required_components("azure-identity-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-identity_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/identity/azure-identity/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-storage-common-cpp CONFIG QUIET)
if(NOT azure-storage-common-cpp_FOUND)
find_package(azure-storage-common-cpp REQUIRED)
endif()
endif()
set(
AZURE_STORAGE_BLOB_HEADER
inc/azure/storage/blobs/protocol/blob_rest_client.hpp
@ -48,14 +58,23 @@ set(
add_library(azure-storage-blobs ${AZURE_STORAGE_BLOB_HEADER} ${AZURE_STORAGE_BLOB_SOURCE})
# make sure that users can consume the project as a library.
add_library(azure::storage::blobs ALIAS azure-storage-blobs)
add_library(Azure::azure-storage-blobs ALIAS azure-storage-blobs)
target_include_directories(azure-storage-blobs PUBLIC inc)
target_link_libraries(azure-storage-blobs azure::storage::common)
target_include_directories(
azure-storage-blobs
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-storage-common-cpp_INCLUDE_DIRS}
)
target_link_libraries(azure-storage-blobs PUBLIC Azure::azure-storage-common)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage/blobs/version.hpp")
generate_documentation(azure-storage-blobs ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-storage-blobs)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(storage azure-storage-blobs azure-storage-test)

Просмотреть файл

@ -0,0 +1,7 @@
Source: azure-storage-blobs-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-storage-common-cpp
Description: Microsoft Azure Storage Blobs SDK for C++
This library provides Azure Storage Blobs SDK.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-blobs
Supports: !uwp

Просмотреть файл

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-storage-common-cpp)
include("${CMAKE_CURRENT_LIST_DIR}/azure-storage-blobs-cppTargets.cmake")
check_required_components("azure-storage-blobs-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-storage-blobs_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-blobs/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-core-cpp CONFIG QUIET)
if(NOT azure-core-cpp_FOUND)
find_package(azure-core-cpp REQUIRED)
endif()
endif()
find_package(Threads REQUIRED)
find_package(LibXml2 REQUIRED)
@ -56,22 +66,34 @@ set(
add_library(azure-storage-common ${AZURE_STORAGE_COMMON_HEADER} ${AZURE_STORAGE_COMMON_SOURCE})
# make sure that users can consume the project as a library.
add_library(azure::storage::common ALIAS azure-storage-common)
add_library(Azure::azure-storage-common ALIAS azure-storage-common)
target_include_directories(
azure-storage-common
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-core-cpp_INCLUDE_DIRS}
)
target_include_directories(azure-storage-common INTERFACE ${LIBXML2_INCLUDE_DIRS})
target_link_libraries(azure-storage-common PUBLIC Azure::azure-core)
target_link_libraries(azure-storage-common INTERFACE Threads::Threads ${LIBXML2_LIBRARIES})
target_include_directories(azure-storage-common PUBLIC inc ${LIBXML2_INCLUDE_DIRS})
target_link_libraries(azure-storage-common Threads::Threads azure-core ${LIBXML2_LIBRARIES})
if(MSVC)
target_link_libraries(azure-storage-common bcrypt)
target_link_libraries(azure-storage-common INTERFACE bcrypt)
# C28020 and C28204 are introduced by nlohmann/json
target_compile_options(azure-storage-common PUBLIC /wd28204 /wd28020)
else()
find_package(OpenSSL REQUIRED)
target_link_libraries(azure-storage-common OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(azure-storage-common INTERFACE OpenSSL::SSL OpenSSL::Crypto)
endif()
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage/common/version.hpp")
generate_documentation(azure-storage-common ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-storage-common)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
# excluding json from coverage report
create_code_coverage(storage azure-storage-common azure-storage-test "inc/azure/storage/common/json*")

Просмотреть файл

@ -0,0 +1,7 @@
Source: azure-storage-common-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-core-cpp, libxml2, openssl (!windows)
Description: Microsoft Azure Common Storage SDK for C++
This library provides common Azure Storage-related abstractions for Azure SDK.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-common
Supports: !uwp

Просмотреть файл

@ -0,0 +1,17 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(LibXml2)
find_dependency(Threads)
find_dependency(azure-core-cpp)
if(NOT MSVC)
find_dependency(OpenSSL)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/azure-storage-common-cppTargets.cmake")
check_required_components("azure-storage-common-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-storage-common_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-common/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-storage-blobs-cpp CONFIG QUIET)
if(NOT azure-storage-blobs-cpp_FOUND)
find_package(azure-storage-blobs-cpp REQUIRED)
endif()
endif()
set(
AZURE_STORAGE_FILES_DATALAKE_HEADER
inc/azure/storage/files/datalake/protocol/datalake_rest_client.hpp
@ -47,15 +57,23 @@ set(
add_library(azure-storage-files-datalake ${AZURE_STORAGE_FILES_DATALAKE_HEADER} ${AZURE_STORAGE_FILES_DATALAKE_SOURCE})
# make sure that users can consume the project as a library.
add_library(azure::storage::files::datalake ALIAS azure-storage-files-datalake)
add_library(Azure::azure-storage-files-datalake ALIAS azure-storage-files-datalake)
target_include_directories(azure-storage-files-datalake PUBLIC inc)
target_include_directories(
azure-storage-files-datalake
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-storage-blobs-cpp_INCLUDE_DIRS}
)
target_link_libraries(azure-storage-files-datalake azure-storage-blobs)
target_link_libraries(azure-storage-files-datalake PUBLIC Azure::azure-storage-blobs)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage/files/datalake/version.hpp")
generate_documentation(azure-storage-files-datalake ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-storage-files-datalake)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(storage azure-storage-files-datalake azure-storage-test)

Просмотреть файл

@ -0,0 +1,7 @@
Source: azure-storage-files-datalake-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-storage-blobs-cpp
Description: Microsoft Azure Storage Files Data Lake SDK for C++
This library provides Azure Storage Files Data Lake SDK.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-files-datalake
Supports: !uwp

Просмотреть файл

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-storage-blobs-cpp)
include("${CMAKE_CURRENT_LIST_DIR}/azure-storage-files-datalake-cppTargets.cmake")
check_required_components("azure-storage-files-datalake-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-storage-files-datalake_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-files-datalake/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-storage-common-cpp CONFIG QUIET)
if(NOT azure-storage-common-cpp_FOUND)
find_package(azure-storage-common-cpp REQUIRED)
endif()
endif()
set(
AZURE_STORAGE_FILES_SHARES_HEADER
inc/azure/storage/files/shares/protocol/share_rest_client.hpp
@ -44,15 +54,23 @@ set(
add_library(azure-storage-files-shares ${AZURE_STORAGE_FILES_SHARES_HEADER} ${AZURE_STORAGE_FILES_SHARES_SOURCE})
# make sure that users can consume the project as a library.
add_library(azure::storage::files::shares ALIAS azure-storage-files-shares)
add_library(Azure::azure-storage-files-shares ALIAS azure-storage-files-shares)
target_include_directories(azure-storage-files-shares PUBLIC inc)
target_include_directories(
azure-storage-files-shares
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-storage-common-cpp_INCLUDE_DIRS}
)
target_link_libraries(azure-storage-files-shares azure-storage-common)
target_link_libraries(azure-storage-files-shares PUBLIC Azure::azure-storage-common)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/storage/files/shares/version.hpp")
generate_documentation(azure-storage-files-shares ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-storage-files-shares)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(storage azure-storage-files-shares azure-storage-test)

Просмотреть файл

@ -0,0 +1,7 @@
Source: azure-storage-files-shares-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-storage-common-cpp
Description: Microsoft Azure Storage Files Shares SDK for C++
This library provides Azure Storage Files Shares SDK.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-files-shares
Supports: !uwp

Просмотреть файл

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-storage-common-cpp)
include("${CMAKE_CURRENT_LIST_DIR}/azure-storage-files-shares-cppTargets.cmake")
check_required_components("azure-storage-files-shares-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-storage-files-shares_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/storage/azure-storage-files-shares/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()

Просмотреть файл

@ -10,12 +10,22 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake-modules")
include(az_vcpkg)
include(az_version)
include(CodeCoverage)
include(DefineTransportAdapter)
include(doxygen_common)
include(global_compile_options)
az_vcpkg_integrate()
if(NOT AZ_ALL_LIBRARIES)
find_package(azure-core-cpp CONFIG QUIET)
if(NOT azure-core-cpp_FOUND)
find_package(azure-core-cpp REQUIRED)
endif()
endif()
set(
AZURE_TEMPLATE_HEADER
inc/azure/template/template_client.hpp
@ -31,11 +41,18 @@ set(
add_library(azure-template ${AZURE_TEMPLATE_HEADER} ${AZURE_TEMPLATE_SOURCE})
target_include_directories(azure-template PUBLIC inc)
target_link_libraries(azure-identity PUBLIC azure-core)
target_include_directories(
azure-template
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
$<INSTALL_INTERFACE:include>
${azure-core-cpp_INCLUDE_DIRS}
)
target_link_libraries(azure-template PUBLIC Azure::azure-core)
# make sure that users can consume the project as a library.
add_library(Azure::Template ALIAS azure-template)
add_library(Azure::azure-template ALIAS azure-template)
# coverage. Has no effect if BUILD_CODE_COVERAGE is OFF
create_code_coverage(template azure-template azure-template-test)
@ -43,6 +60,8 @@ create_code_coverage(template azure-template azure-template-test)
get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/inc/azure/template/version.hpp")
generate_documentation(azure-template ${AZ_LIBRARY_VERSION})
az_vcpkg_export(azure-template)
if(BUILD_TESTING)
# tests
add_subdirectory(test)

Просмотреть файл

@ -14,7 +14,7 @@ add_executable (
ut/template_test.cpp
)
target_link_libraries(azure-template-test PUBLIC Azure::Template)
target_link_libraries(azure-template-test PRIVATE Azure::azure-template)
if (MSVC)
target_compile_options(azure-template-test PUBLIC /wd6326 /wd26495 /wd26812)

Просмотреть файл

@ -0,0 +1,8 @@
Source: azure-template-cpp
Version: @AZ_LIBRARY_VERSION@
Build-Depends: azure-core-cpp
Description: Microsoft Azure Template SDK for C++
This is a template library meant to illustrate initial client library development process for Azure SDK.
It is not meant to be published to vcpkg.
Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/template/azure-template
Supports: !uwp

Просмотреть файл

@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(azure-core-cpp)
include("${CMAKE_CURRENT_LIST_DIR}/azure-template-cppTargets.cmake")
check_required_components("azure-template-cpp")

Просмотреть файл

@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-sdk-for-cpp
REF azure-template_@AZ_LIBRARY_VERSION@
SHA512 1
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/sdk/template/azure-template/
PREFER_NINJA
OPTIONS
-DWARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()