diff options
author | Slávek Banko <[email protected]> | 2019-01-14 20:24:38 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2019-01-14 20:24:38 +0100 |
commit | ea81c7295c71a2280922034e0929c95496833459 (patch) | |
tree | c68f7bd209114102991b09c3d3b9137653d72c96 | |
parent | 5c096137117e69dfcb8cd5a0c4432ffa93d4cbc9 (diff) | |
download | tde-cmake-ea81c7295c71a2280922034e0929c95496833459.tar.gz tde-cmake-ea81c7295c71a2280922034e0929c95496833459.zip |
Fix tde_create_tarball macro
+ The destination path for the installation was not properly used.
+ Dependency on source files was wrong when SOURCEDIR was used.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | modules/TDEMacros.cmake | 11 |
1 files changed, 8 insertions, 3 deletions
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}" ) |