pineapple-src/externals/vcpkg/ports/azure-c-shared-utility/improve-dependencies-preview.patch
2022-07-23 03:01:36 +02:00

68 lines
2.5 KiB
Diff
Executable file

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46334c1..aaeea20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,7 +115,6 @@ if(${use_openssl})
if (NOT TARGET OpenSSL::SSL OR NOT TARGET OpenSSL::Crypto OR NOT ${OPENSSL_INCLUDE_DIR})
find_package(OpenSSL REQUIRED)
endif()
- include_directories(${OPENSSL_INCLUDE_DIR})
endif()
if(${use_applessl})
@@ -521,8 +520,7 @@ if(${use_http})
set(CURL_FIND_REQUIRED 1)
find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARIES)
- include_directories(${CURL_INCLUDE_DIRS})
- set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${CURL_LIBRARIES})
+ set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} CURL::libcurl)
endif(NOT use_builtin_httpapi)
endif()
endif(${use_http})
@@ -561,7 +559,7 @@ if(${use_bearssl})
endif()
if(${use_openssl})
- set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${OPENSSL_LIBRARIES})
+ set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} OpenSSL::SSL)
if (WIN32)
set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} crypt32 ws2_32 secur32)
endif()
@@ -703,7 +701,7 @@ write_basic_package_version_file(
configure_file("configs/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake"
- COPYONLY
+ @ONLY
)
install(EXPORT aziotsharedutilTargets
@@ -715,7 +713,7 @@ install(EXPORT aziotsharedutilTargets
install(
FILES
- "configs/${PROJECT_NAME}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake"
"configs/${PROJECT_NAME}Functions.cmake"
"configs/azure_iot_build_rules.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
diff --git a/configs/azure_c_shared_utilityConfig.cmake b/configs/azure_c_shared_utilityConfig.cmake
index 52f2c7e1..11e9332b 100644
--- a/configs/azure_c_shared_utilityConfig.cmake
+++ b/configs/azure_c_shared_utilityConfig.cmake
@@ -1,6 +1,14 @@
#Copyright (c) Microsoft. All rights reserved.
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
+include(CMakeFindDependencyMacro)
+if("@use_openssl@")
+ find_dependency(OpenSSL)
+endif()
+if(UNIX AND NOT "@use_builtin_httpapi@")
+ find_dependency(CURL)
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/azure_c_shared_utilityTargets.cmake")
get_target_property(AZURE_C_SHARED_UTILITY_INCLUDES aziotsharedutil INTERFACE_INCLUDE_DIRECTORIES)