mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 03:53:23 +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
|
||||
list(LENGTH AFCWP_OPTIONS options_length)
|
||||
math(EXPR max_idx "${options_length} - 1")
|
||||
foreach(idx RANGE 0 ${max_idx} 2)
|
||||
list(GET AFCWP_OPTIONS ${idx} key)
|
||||
math(EXPR value_idx "${idx} + 1")
|
||||
list(GET AFCWP_OPTIONS ${value_idx} value)
|
||||
set(${key} ${value} CACHE STRING "${key}" FORCE)
|
||||
endforeach()
|
||||
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)
|
||||
math(EXPR value_idx "${idx} + 1")
|
||||
list(GET AFCWP_OPTIONS ${value_idx} value)
|
||||
set(${key} ${value} CACHE STRING "${key}" FORCE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Make the content available
|
||||
FetchContent_MakeAvailable(${AFCWP_TARGET})
|
||||
|
|
Loading…
Add table
Reference in a new issue