1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

tooling: allow empty options for add_fetch_content

Change-Id: If460259ef799c53ddd94e3c058fb5b42e77fbdcb
This commit is contained in:
Andreas Traczyk 2024-01-29 11:27:43 -05:00
parent 50ce16e0ab
commit 3dfcae1c09

View file

@ -71,6 +71,7 @@ function(add_fetch_content)
# Apply options
list(LENGTH AFCWP_OPTIONS options_length)
if(NOT ${options_length} EQUAL 0)
math(EXPR max_idx "${options_length} - 1")
foreach(idx RANGE 0 ${max_idx} 2)
list(GET AFCWP_OPTIONS ${idx} key)
@ -78,6 +79,7 @@ function(add_fetch_content)
list(GET AFCWP_OPTIONS ${value_idx} value)
set(${key} ${value} CACHE STRING "${key}" FORCE)
endforeach()
endif()
# Make the content available
FetchContent_MakeAvailable(${AFCWP_TARGET})