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:
parent
50ce16e0ab
commit
3dfcae1c09
1 changed files with 9 additions and 7 deletions
|
@ -71,13 +71,15 @@ function(add_fetch_content)
|
||||||
|
|
||||||
# Apply options
|
# Apply options
|
||||||
list(LENGTH AFCWP_OPTIONS options_length)
|
list(LENGTH AFCWP_OPTIONS options_length)
|
||||||
math(EXPR max_idx "${options_length} - 1")
|
if(NOT ${options_length} EQUAL 0)
|
||||||
foreach(idx RANGE 0 ${max_idx} 2)
|
math(EXPR max_idx "${options_length} - 1")
|
||||||
list(GET AFCWP_OPTIONS ${idx} key)
|
foreach(idx RANGE 0 ${max_idx} 2)
|
||||||
math(EXPR value_idx "${idx} + 1")
|
list(GET AFCWP_OPTIONS ${idx} key)
|
||||||
list(GET AFCWP_OPTIONS ${value_idx} value)
|
math(EXPR value_idx "${idx} + 1")
|
||||||
set(${key} ${value} CACHE STRING "${key}" FORCE)
|
list(GET AFCWP_OPTIONS ${value_idx} value)
|
||||||
endforeach()
|
set(${key} ${value} CACHE STRING "${key}" FORCE)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Make the content available
|
# Make the content available
|
||||||
FetchContent_MakeAvailable(${AFCWP_TARGET})
|
FetchContent_MakeAvailable(${AFCWP_TARGET})
|
||||||
|
|
Loading…
Add table
Reference in a new issue