CMake: support out-of-tree builds
- The variables that are set for out-of-tree builds are prefixed with to avoid name clashes; make the module-infrastructure respect those instead of the in-tree variable names. - .. and then duplicate the in-tree variables to the out-of-tree variables, so we only need one set of module instructions.
This commit is contained in:
parent
992079bac1
commit
73f8c627bd
@ -359,6 +359,13 @@ if( NOT PYTHONLIBS_FOUND OR NOT PYTHONQT_FOUND )
|
||||
set( WITH_PYTHONQT OFF )
|
||||
endif()
|
||||
|
||||
# Now we know the state of the ABI-options, copy them into "Calamares_"
|
||||
# prefixed variables, to match how the variables would-be-named
|
||||
# when building out-of-tree.
|
||||
set(Calamares_WITH_PYTHON ${WITH_PYTHON})
|
||||
set(Calamares_WITH_PYTHONQT ${WITH_PYTHONQT})
|
||||
set(Calamares_WITH_QML ${WITH_QML})
|
||||
|
||||
### Transifex Translation status
|
||||
#
|
||||
# Construct language lists for use. If there are p_tx* variables,
|
||||
|
@ -70,11 +70,11 @@ function( calamares_add_module_subdirectory )
|
||||
# _mod_testing boolean if the module should be added to the loadmodule tests
|
||||
file(STRINGS "${_mod_dir}/module.desc" MODULE_INTERFACE REGEX "^interface")
|
||||
if ( MODULE_INTERFACE MATCHES "pythonqt" )
|
||||
set( _mod_enabled ${WITH_PYTHONQT} )
|
||||
set( _mod_enabled ${Calamares_WITH_PYTHONQT} )
|
||||
set( _mod_reason "No PythonQt support" )
|
||||
set( _mod_testing OFF )
|
||||
elseif ( MODULE_INTERFACE MATCHES "python" )
|
||||
set( _mod_enabled ${WITH_PYTHON} )
|
||||
set( _mod_enabled ${Calamares_WITH_PYTHON} )
|
||||
set( _mod_reason "No Python support" )
|
||||
set( _mod_testing ON ) # Will check syntax and imports, at least
|
||||
elseif ( MODULE_INTERFACE MATCHES "qtplugin" )
|
||||
|
Loading…
Reference in New Issue
Block a user