CMake: report Python module name without subdirectory

FIXES ##1641
This commit is contained in:
Adriaan de Groot 2021-03-22 13:49:04 +01:00
parent dc0164d508
commit 0bf1df72cd

View File

@ -59,10 +59,10 @@ function( calamares_add_module_subdirectory )
if( _dirname ) if( _dirname )
# Remove the dirname and any leftover leading /s # Remove the dirname and any leftover leading /s
string( REGEX REPLACE "^${_dirname}/*" "" _modulename "${SUBDIRECTORY}" ) string( REGEX REPLACE "^${_dirname}/*" "" _modulename "${SUBDIRECTORY}" )
set( MODULE_DESTINATION ${MODULES_DIR}/${_modulename} )
else() else()
set( MODULE_DESTINATION ${MODULES_DIR}/${SUBDIRECTORY} ) set( _modulename ${SUBDIRECTORY} )
endif() endif()
set( MODULE_DESTINATION ${MODULES_DIR}/${_modulename} )
# Read module.desc, check that the interface type is supported. # Read module.desc, check that the interface type is supported.
# #
@ -114,7 +114,7 @@ function( calamares_add_module_subdirectory )
endif() endif()
endforeach() endforeach()
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${SUBDIRECTORY}${ColorReset}" ) message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${_modulename}${ColorReset}" )
message( " ${Green}TYPE:${ColorReset} jobmodule" ) message( " ${Green}TYPE:${ColorReset} jobmodule" )
message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" ) message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" )
if( MODULE_CONFIG_FILES ) if( MODULE_CONFIG_FILES )