浏览代码

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.
PatTheMav 3 年之前
父节点
当前提交
90286a537b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      cmake/Modules/CopyMSVCBins.cmake

+ 5 - 0
cmake/Modules/CopyMSVCBins.cmake

@@ -131,6 +131,11 @@ file(
   "${SSL_INCLUDE_DIR}/bin/ssleay32*.dll"
   "${SSL_INCLUDE_DIR}/bin/ssleay32*.dll"
   "${SSL_INCLUDE_DIR}/bin/libeay32*.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(
 file(
   GLOB
   GLOB
   CURL_BIN_FILES
   CURL_BIN_FILES