Browse Source

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 years ago
parent
commit
90286a537b
1 changed files with 5 additions and 0 deletions
  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/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