Adds curl to the list of system libraries
Fixes macOS build with system libcurl
This commit is contained in:
parent
45e4627ac9
commit
733cf89cff
|
@ -33,4 +33,5 @@
|
||||||
| audacity_use_vorbis | STRING | local | Use vorbis library [system (if available), local, off] |
|
| audacity_use_vorbis | STRING | local | Use vorbis library [system (if available), local, off] |
|
||||||
| audacity_use_vst | BOOL | ON | Use VST2 plug-in support [on, off] |
|
| audacity_use_vst | BOOL | ON | Use VST2 plug-in support [on, off] |
|
||||||
| audacity_use_wxwidgets | STRING | local | Use wxwidgets library [system (if available), local, off] |
|
| audacity_use_wxwidgets | STRING | local | Use wxwidgets library [system (if available), local, off] |
|
||||||
| audacity_use_zlib | STRING | system | Use zlib library [system (if available), local, off] |
|
| audacity_use_zlib | STRING | local | Use zlib library [system (if available), local, off] |
|
||||||
|
| audacity_use_curl | STRING | local | Use curl library [system (if available), local] |
|
|
@ -111,8 +111,7 @@ add_conan_lib(
|
||||||
OPTION_NAME curl
|
OPTION_NAME curl
|
||||||
PKG_CONFIG "libcurl >= 7.68.0"
|
PKG_CONFIG "libcurl >= 7.68.0"
|
||||||
INTERFACE_NAME CURL::libcurl
|
INTERFACE_NAME CURL::libcurl
|
||||||
FIND_PACKAGE_OPTIONS
|
FIND_PACKAGE_OPTIONS
|
||||||
COMPONENTS HTTP HTTPS SSL
|
|
||||||
CONAN_OPTIONS
|
CONAN_OPTIONS
|
||||||
libcurl:with_ssl=${curl_ssl}
|
libcurl:with_ssl=${curl_ssl}
|
||||||
libcurl:shared=True
|
libcurl:shared=True
|
||||||
|
|
|
@ -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()
|
|
@ -38,6 +38,7 @@ cmake_options=(
|
||||||
-Daudacity_use_sbsms=local # We prefer using the latest version of sbsms
|
-Daudacity_use_sbsms=local # We prefer using the latest version of sbsms
|
||||||
-Daudacity_use_soundtouch=system
|
-Daudacity_use_soundtouch=system
|
||||||
-Daudacity_use_twolame=system
|
-Daudacity_use_twolame=system
|
||||||
|
-Daudacity_use_curl=system
|
||||||
)
|
)
|
||||||
|
|
||||||
cmake "${cmake_options[@]}" ../audacity
|
cmake "${cmake_options[@]}" ../audacity
|
||||||
|
|
Loading…
Reference in New Issue