source: calamares/trunk/fuentes/src/modules/CMakeLists.txt @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.5 KB
Line 
1# The variable SKIP_MODULES can be set to skip particular modules;
2# individual modules can also decide they must be skipped (e.g. OS-specific
3# modules, or ones with unmet dependencies). Collect the skipped modules
4# in this list.
5set( LIST_SKIPPED_MODULES "" )
6
7if( BUILD_TESTING )
8    add_executable( test_conf test_conf.cpp )
9    target_link_libraries( test_conf ${YAMLCPP_LIBRARY} Qt5::Core )
10    target_include_directories( test_conf PUBLIC ${YAMLCPP_INCLUDE_DIR} )
11endif()
12
13string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" )
14
15file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" )
16list( SORT SUBDIRECTORIES )
17
18foreach( SUBDIRECTORY ${SUBDIRECTORIES} )
19    list( FIND SKIP_LIST ${SUBDIRECTORY} DO_SKIP )
20
21    if( NOT DO_SKIP EQUAL -1 )
22        message( "${ColorReset}-- Skipping module ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
23        message( "" )
24        list( APPEND LIST_SKIPPED_MODULES "${SUBDIRECTORY} (user request)" )
25    elseif( ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" ) AND
26            ( DO_SKIP EQUAL -1 ) )
27        set( SKIPPED_MODULES )
28        calamares_add_module_subdirectory( ${SUBDIRECTORY} )
29        if ( SKIPPED_MODULES )
30            list( APPEND LIST_SKIPPED_MODULES "${SKIPPED_MODULES}" )
31        endif()
32    endif()
33endforeach()
34
35# This is *also* done in top-level, so list is displayed
36# both before and after the feature summary.
37calamares_explain_skipped_modules( ${LIST_SKIPPED_MODULES} )
38
39include( CalamaresAddTranslations )
40add_calamares_python_translations( ${CALAMARES_TRANSLATION_LANGUAGES} )
Note: See TracBrowser for help on using the repository browser.