@ -15,20 +15,23 @@ string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" )
file ( GLOB SUBDIRECTORIES RELATIVE ${ CMAKE_CURRENT_SOURCE_DIR } "*" )
list ( SORT SUBDIRECTORIES )
# H a n d l e t h e U S E _ < f o o > v a r i a b l e s b y l o o k i n g f o r s u b d i r e c t o r i e s
# w i t h a < f o o > - < i m p l e m e n t a t i o n > k i n d o f n a m e .
foreach ( SUBDIRECTORY ${ SUBDIRECTORIES } )
endforeach ( )
set ( _use_categories "" )
set ( _found_categories "" )
foreach ( SUBDIRECTORY ${ SUBDIRECTORIES } )
list ( FIND SKIP_LIST ${ SUBDIRECTORY } DO_SKIP )
set ( _skip_reason "user request" )
# H a n d l e t h e U S E _ < f o o > v a r i a b l e s b y l o o k i n g f o r s u b d i r e c t o r i e s
# w i t h a < f o o > - < i m p l e m e n t a t i o n > k i n d o f n a m e .
if ( SUBDIRECTORY MATCHES "^[a-zA-Z0-9_]+-" )
string ( REGEX REPLACE "^[^-]+-" "" _implementation ${ SUBDIRECTORY } )
string ( REGEX REPLACE "-.*" "" _category ${ SUBDIRECTORY } )
if ( USE_ ${ _category } )
if ( NOT "${_implementation}" STREQUAL "${USE_${_category}}" )
list ( APPEND _use_categories ${ _category } )
if ( "${_implementation}" STREQUAL "${USE_${_category}}" )
list ( APPEND _found_categories ${ _category } )
else ( )
list ( APPEND SKIP_LIST ${ SUBDIRECTORY } )
set ( _skip_reason "USE_${_category}=${USE_${_category}}" )
set ( DO_SKIP 1 )
@ -54,5 +57,12 @@ endforeach()
# b o t h b e f o r e a n d a f t e r t h e f e a t u r e s u m m a r y .
calamares_explain_skipped_modules ( ${ LIST_SKIPPED_MODULES } )
foreach ( _category ${ _use_categories } )
list ( FIND _found_categories ${ _category } _found )
if ( _found EQUAL -1 )
message ( FATAL_ERROR "USE_${_category} is set to ${USE_${_category}} and no module matches." )
endif ( )
endforeach ( )
include ( CalamaresAddTranslations )
add_calamares_python_translations ( ${ CALAMARES_TRANSLATION_LANGUAGES } )