diff --git a/CMakeLists.txt b/CMakeLists.txt index 7473876ce..e3c4ee7fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ if( POLICY CMP0071 ) cmake_policy( SET CMP0071 NEW ) endif() if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") - list(APPEND CMAKE_AUTOMOC_MACRO_NAMES + list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_PLUGIN_FACTORY_WITH_JSON" "K_EXPORT_PLASMA_DATAENGINE_WITH_JSON" "K_EXPORT_PLASMA_RUNNER" @@ -119,6 +119,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) endif() include( FeatureSummary ) +include( CMakeColors ) set( QT_VERSION 5.6.0 ) @@ -313,6 +314,12 @@ add_feature_info(KCrash ${WITH_KF5Crash} "Crash dumps via KCrash") feature_summary(WHAT ALL) +get_directory_property( SKIPPED_MODULES + DIRECTORY src/modules + DEFINITION LIST_SKIPPED_MODULES +) +calamares_explain_skipped_modules( ${SKIPPED_MODULES} ) + # Add all targets to the build-tree export set set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" ) set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" ) diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 12aad380f..f85de36e9 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -1,4 +1,3 @@ -include( CMakeColors ) include( CalamaresAddTranslations ) set( MODULE_DATA_DESTINATION share/calamares/modules ) @@ -9,6 +8,16 @@ macro( calamares_skip_module ) set( SKIPPED_MODULES ${SKIPPED_MODULES} ${ARGV} PARENT_SCOPE ) endmacro() +function( calamares_explain_skipped_modules ) + if ( ARGN ) + message( "${ColorReset}-- Skipped modules:" ) + foreach( SUBDIRECTORY ${ARGN} ) + message( "${ColorReset}-- Skipped ${BoldRed}${SUBDIRECTORY}${ColorReset}." ) + endforeach() + message( "" ) + endif() +endfunction() + function( calamares_add_module_subdirectory ) set( SUBDIRECTORY ${ARGV0} ) diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 8235bc2e9..d793b718f 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -1,5 +1,3 @@ -include( CMakeColors ) - # The variable SKIP_MODULES can be set to skip particular modules; # individual modules can also decide they must be skipped (e.g. OS-specific # modules, or ones with unmet dependencies). Collect the skipped modules @@ -31,13 +29,9 @@ foreach( SUBDIRECTORY ${SUBDIRECTORIES} ) endif() endforeach() -if ( LIST_SKIPPED_MODULES ) - message( "${ColorReset}-- Skipped modules:" ) - foreach( SUBDIRECTORY ${LIST_SKIPPED_MODULES} ) - message( "${ColorReset}-- Skipped ${BoldRed}${SUBDIRECTORY}${ColorReset}." ) - endforeach() - message( "" ) -endif() +# This is *also* done in top-level, so list is displayed +# both before and after the feature summary. +calamares_explain_skipped_modules( ${LIST_SKIPPED_MODULES} ) include( CalamaresAddTranslations ) add_calamares_python_translations( ${CALAMARES_TRANSLATION_LANGUAGES} )