CMake: stop overwriting branding settings in the build dir
- Only copy over branding files if they are newer Typically I have KDevelop open while working on Calamares; if I am editing settings in `branding.desc` in the build directory, then every time KDevelop runs CMake in the background, my changes (for testing branding things!) would be overwritten. Don't do that. For normal builds with a clean build directory, this doesn't change anything since the target is missing; changing a file in the source directory **will** copy it over the build directory version.
This commit is contained in:
parent
14fbfa72d3
commit
37ce49b001
@ -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}/ )
|
||||
|
Loading…
Reference in New Issue
Block a user