summaryrefslogtreecommitdiff
path: root/win/packaging
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-05-27 18:57:40 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2011-05-27 18:57:40 +0200
commit7aba87b72f9d5bd808a869cfc8b2fed9dcb7da88 (patch)
tree7db56a9e10097db148f778bbfbe7e7a042b8a64a /win/packaging
parent73f78f77667f22020a9497b329abaa89fc82ba17 (diff)
downloadmariadb-git-7aba87b72f9d5bd808a869cfc8b2fed9dcb7da88.tar.gz
Workaround a cmake bug that was only visible on a newly installed Philip's machine.
CMake 2.8.4 crashed on this line IF(something AND IS_DIRECTORY(something_else)) when both "something" and "something_else" were empty. Changing the line slightly (using cascading "IF" instead) solved the crash.
Diffstat (limited to 'win/packaging')
-rw-r--r--win/packaging/create_msi.cmake.in16
1 files changed, 10 insertions, 6 deletions
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}<Directory Id='D.${id}' Name='${name}'>\n")
+ IF(rel)
+ IF (IS_DIRECTORY "${f}")
+ MAKE_WIX_IDENTIFIER("${rel}" id)
+ GET_FILENAME_COMPONENT(name ${dir} NAME)
+ FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\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}</Directory>\n")
+ IF(rel)
+ IF(IS_DIRECTORY "${f}")
+ FILE(APPEND ${file} "${prefix}</Directory>\n")
+ ENDIF()
ENDIF()
ENDFUNCTION()