summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorvvaintroub <vvaintroub@win7>2010-02-11 19:23:11 +0100
committervvaintroub <vvaintroub@win7>2010-02-11 19:23:11 +0100
commit900317e6bd1fa3935a537275efa8059c5e883122 (patch)
treee3454f05c69a88b0bd0e53d0ac20743e011bbf4d /packaging
parent010bc51e54b4754372a877514b919c5e41a6f6c7 (diff)
downloadmariadb-git-900317e6bd1fa3935a537275efa8059c5e883122.tar.gz
Fix CMake 2.6 errors
Diffstat (limited to 'packaging')
-rw-r--r--packaging/WiX/CMakeLists.txt16
-rw-r--r--packaging/WiX/create_msi.cmake.in8
2 files changed, 17 insertions, 7 deletions
diff --git a/packaging/WiX/CMakeLists.txt b/packaging/WiX/CMakeLists.txt
index 1d1a82f7b1c..81852697fb8 100644
--- a/packaging/WiX/CMakeLists.txt
+++ b/packaging/WiX/CMakeLists.txt
@@ -1,18 +1,26 @@
+
+IF(NOT WIN32)
+ RETURN()
+ENDIF()
+
FIND_PATH(WIX_DIR heat.exe
$ENV{WIX_DIR}/bin
$ENV{ProgramFiles}/wix/bin
- "$ENV{ProgramFiles}/Windows Installer XML v3.0/bin"
+ "$ENV{ProgramFiles}/Windows Installer XML v3/bin"
"$ENV{ProgramFiles}/Windows Installer XML v3.5/bin"
)
IF(NOT WIX_DIR)
- MESSAGE(FATAL_ERROR "Cannot find wix")
+ IF(NOT _WIX_DIR_CHECKED)
+ SET(_WIX_DIR_CHECKED 1 CACHE INTERNAL "")
+ MESSAGE(STATUS "Cannot find wix 3, installer project will not be generated")
+ ENDIF()
+ RETURN()
ENDIF()
FIND_PROGRAM(HEAT_EXECUTABLE heat ${WIX_DIR})
FIND_PROGRAM(CANDLE_EXECUTABLE candle ${WIX_DIR})
FIND_PROGRAM(LIGHT_EXECUTABLE light ${WIX_DIR})
-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
@@ -21,7 +29,7 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}")
ENDIF()
ADD_CUSTOM_TARGET(
- WIX_Installer
+ MSI
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in
index 34aa53fdc91..15cdc3e4315 100644
--- a/packaging/WiX/create_msi.cmake.in
+++ b/packaging/WiX/create_msi.cmake.in
@@ -24,9 +24,11 @@ FOREACH(comp ${CPACK_COMPONENTS_ALL})
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DCMAKE_INSTALL_COMPONENT=${comp}
-DCMAKE_INSTALL_PREFIX= -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ OUTPUT_QUIET
)
ENDFOREACH()
+SET(INC_VAR 0)
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}")
@@ -35,9 +37,9 @@ MACRO(MAKE_WIX_IDENTIFIER str varname)
# We have to cut down the length to 70 chars, since we add 2 char prefix
# pretty often
IF(len GREATER 70)
- STRING(RANDOM r)
- STRING(SUBSTRING "${${varname}}" 0 65 shortstr)
- SET(${varname} "${shortstr}${r}")
+ STRING(SUBSTRING "${${varname}}" 0 67 shortstr)
+ MATH(EXPR INC_VAR ${INC_VAR}+1)
+ SET(${varname} "${shortstr}${INC_VAR}")
ENDIF()
ENDMACRO()