diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index be4b762..d48033c 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -1620,8 +1620,8 @@ macro( tde_create_tarball ) # found directive "DESTINATION" if( "+${_arg}" STREQUAL "+DESTINATION" ) - unset( _dest ) - set( _var _dest ) + unset( _destination ) + set( _var _destination ) set( _directive 1 ) endif( ) @@ -1642,6 +1642,11 @@ macro( tde_create_tarball ) file( GLOB_RECURSE _files RELATIVE ${_sourcedir} "${_sourcedir}/*" ) endif( ) + unset( _files_deps ) + foreach( _file ${_files} ) + list( APPEND _files_deps "${_sourcedir}/${_file}" ) + endforeach( ) + get_filename_component( _target_path "${CMAKE_CURRENT_BINARY_DIR}/${_target}" ABSOLUTE ) file( RELATIVE_PATH _target_path "${CMAKE_BINARY_DIR}" "${_target_path}" ) string( REPLACE "/" "+" _target_name "${_target_path}" ) @@ -1652,7 +1657,7 @@ macro( tde_create_tarball ) COMMAND ${CMAKE_COMMAND} -E tar "cfz" "${CMAKE_CURRENT_BINARY_DIR}/${_target}" -- ${_files} WORKING_DIRECTORY "${_sourcedir}" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_target}" - DEPENDS ${_files} + DEPENDS ${_files_deps} COMMENT "Create tarball ${_target_path}" )