diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake.in index 393e1b634b2..13c433887b8 100644 --- a/win/packaging/create_msi.cmake.in +++ b/win/packaging/create_msi.cmake.in @@ -304,10 +304,12 @@ ENDFUNCTION() FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) FILE(RELATIVE_PATH rel ${topdir} ${dir}) - IF(rel AND IS_DIRECTORY "${f}") - MAKE_WIX_IDENTIFIER("${rel}" id) - GET_FILENAME_COMPONENT(name ${dir} NAME) - FILE(APPEND ${file} "${prefix}\n") + IF(rel) + IF (IS_DIRECTORY "${f}") + MAKE_WIX_IDENTIFIER("${rel}" id) + GET_FILENAME_COMPONENT(name ${dir} NAME) + FILE(APPEND ${file} "${prefix}\n") + ENDIF() ENDIF() FILE(GLOB all_files ${dir}/*) FOREACH(f ${all_files}) @@ -315,8 +317,10 @@ FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix) TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ") ENDIF() ENDFOREACH() - IF(rel AND IS_DIRECTORY "${f}") - FILE(APPEND ${file} "${prefix}\n") + IF(rel) + IF(IS_DIRECTORY "${f}") + FILE(APPEND ${file} "${prefix}\n") + ENDIF() ENDIF() ENDFUNCTION()