From 90286a537b7e43e419743cb80324711c802ae9fe Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Mon, 2 May 2022 19:23:52 +0200 Subject: [PATCH] cmake: Fix cURL library handling for updated dependencies Soon to be updated obs-deps built on CI will retain CMake package files created while building dependencies. When CMake uses packages, the usual triplet of variables from finders are not set. `CopyMSVCBins` relies on one such variable. This PR sets the `CURL_INCLUDE_DIR` if the cURL target is present, but apparently imported as a CMake package, to ensure prior functionality is restored. --- cmake/Modules/CopyMSVCBins.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Modules/CopyMSVCBins.cmake b/cmake/Modules/CopyMSVCBins.cmake index de253d305..c1d27ce5e 100644 --- a/cmake/Modules/CopyMSVCBins.cmake +++ b/cmake/Modules/CopyMSVCBins.cmake @@ -131,6 +131,11 @@ file( "${SSL_INCLUDE_DIR}/bin/ssleay32*.dll" "${SSL_INCLUDE_DIR}/bin/libeay32*.dll") +if(NOT DEFINED CURL_INCLUDE_DIR AND TARGET CURL::libcurl) + get_target_property(CURL_INCLUDE_DIR CURL::libcurl + INTERFACE_INCLUDE_DIRECTORIES) +endif() + file( GLOB CURL_BIN_FILES