@ -3,10 +3,20 @@ include( CMakeColors )
function ( calamares_add_branding_subdirectory )
set ( SUBDIRECTORY ${ ARGV0 } )
if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
add_subdirectory ( $ SUBDIRECTORY )
message ( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} branding component: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
elseif ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
set ( BRANDING_DIR share/calamares/branding )
set ( BRANDING_COMPONENT_DESTINATION ${ BRANDING_DIR } / ${ SUBDIRECTORY } )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
message ( "-- ${BoldYellow}Warning:${ColorReset} branding component ${BoldRed}${SUBDIRECTORY}${ColorReset} has a translations subdirectory but no CMakeLists.txt." )
message ( "" )
return ( )
endif ( )
# W e g l o b a l l t h e f i l e s i n s i d e t h e s u b d i r e c t o r y , a n d w e m a k e s u r e t h e y a r e
# s y n c e d w i t h t h e b i n d i r s t r u c t u r e a n d i n s t a l l e d .
file ( GLOB BRANDING_COMPONENT_FILES RELATIVE ${ CMAKE_CURRENT_SOURCE_DIR } / ${ SUBDIRECTORY } "${SUBDIRECTORY}/*" )