From b3172b1784ed15d4c310793474e285222fc669a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 18:01:33 -0700 Subject: [azure-storage-cpp] Support latest HEAD of cpprestsdk --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 1 + .../support-cpprest-findpackage.patch | 32 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ports/azure-storage-cpp/support-cpprest-findpackage.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 1917bad6d..bf4e9f9f2 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-3 +Version: 3.0.0-4 Build-Depends: cpprestsdk, atlmfc Description: Microsoft Azure Storage Client SDK for C++ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 150c4aafc..7359f3bc7 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch + ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch ) vcpkg_configure_cmake( diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch new file mode 100644 index 000000000..5cd805208 --- /dev/null +++ b/ports/azure-storage-cpp/support-cpprest-findpackage.patch @@ -0,0 +1,32 @@ +diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +index 3b4d1c0..d8818ac 100644 +--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +index da66eb4..40e1767 100644 +--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake ++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library + find_library(CASABLANCA_LIBRARY + NAMES -- cgit v1.2.3