diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 9283b48a7..70fcd9279 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -70,7 +70,11 @@ function( calamares_add_branding NAME ) foreach( BRANDING_COMPONENT_FILE ${BRANDING_COMPONENT_FILES} ) set( _subpath ${_brand_dir}/${BRANDING_COMPONENT_FILE} ) if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_subpath} ) - configure_file( ${_subpath} ${_subpath} COPYONLY ) + set( _src ${CMAKE_CURRENT_SOURCE_DIR}/${_subpath} ) + set( _dst ${CMAKE_CURRENT_BINARY_DIR}/${_subpath} ) + if( ${_src} IS_NEWER_THAN ${_dst} ) + configure_file( ${_src} ${_dst} COPYONLY ) + endif() install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_subpath} DESTINATION ${BRANDING_COMPONENT_DESTINATION}/${_subdir}/ )