mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
cmake: don't run SORT on empty list
In case of an empty list, SORTing leads to the cmake error "list sub-command SORT requires list to be present." Closes https://github.com/curl/curl/pull/3736
This commit is contained in:
parent
55734f3a27
commit
1a3aa5c321
@ -1239,7 +1239,9 @@ _add_if("SCP" USE_LIBSSH2)
|
|||||||
_add_if("SFTP" USE_LIBSSH2)
|
_add_if("SFTP" USE_LIBSSH2)
|
||||||
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
|
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
|
||||||
_add_if("RTMP" USE_LIBRTMP)
|
_add_if("RTMP" USE_LIBRTMP)
|
||||||
list(SORT _items)
|
if(_items)
|
||||||
|
list(SORT _items)
|
||||||
|
endif()
|
||||||
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
|
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
|
||||||
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
|
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user