forked from audacity/audacity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds curl to the list of system libraries
Fixes macOS build with system libcurl
- Loading branch information
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
if( ${_OPT}use_curl STREQUAL "system" ) | ||
# On macOS - CURL::libcurl is not defined by FindCURL for some reason | ||
|
||
if(NOT TARGET CURL::libcurl) | ||
add_library(CURL::libcurl UNKNOWN IMPORTED) | ||
set_target_properties(CURL::libcurl PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}") | ||
|
||
if(EXISTS "${CURL_LIBRARY}") | ||
set_target_properties(CURL::libcurl PROPERTIES | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" | ||
IMPORTED_LOCATION "${CURL_LIBRARY}") | ||
endif() | ||
|
||
if(CURL_LIBRARY_RELEASE) | ||
set_property(TARGET CURL::libcurl APPEND PROPERTY | ||
IMPORTED_CONFIGURATIONS RELEASE) | ||
set_target_properties(CURL::libcurl PROPERTIES | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" | ||
IMPORTED_LOCATION_RELEASE "${CURL_LIBRARY_RELEASE}") | ||
endif() | ||
if(CURL_LIBRARY_DEBUG) | ||
set_property(TARGET CURL::libcurl APPEND PROPERTY | ||
IMPORTED_CONFIGURATIONS DEBUG) | ||
set_target_properties(CURL::libcurl PROPERTIES | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" | ||
IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}") | ||
endif() | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters