summaryrefslogtreecommitdiff
path: root/win/packaging/ca/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-01-29 19:06:50 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-01-29 19:06:50 +0100
commite353bc80f721fc415ab2977f503878d69b43e63e (patch)
tree78b70b20ed5a3b60bf1d12dd981c99667ebcdb3b /win/packaging/ca/CMakeLists.txt
parente15f914813e1b3da2d0098715a1df2612191a49d (diff)
downloadmariadb-git-e353bc80f721fc415ab2977f503878d69b43e63e.tar.gz
MWL#55 : implement MSI installer
The general technique to generate MSI using CMake is taken from MySQL 5.5 Additional features not present in 5.5 installer : -optionally creating a new database (as Windows service), using new mysql_install_db.exe to do the job - optional upgrade of existing services from old MySQL or Maria installation. This work is actually done by the upgrade wizard that is launched at the end of installation.
Diffstat (limited to 'win/packaging/ca/CMakeLists.txt')
-rw-r--r--win/packaging/ca/CMakeLists.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
new file mode 100644
index 00000000000..d09fae1918c
--- /dev/null
+++ b/win/packaging/ca/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Copyright 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc)
+LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib)
+
+SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
+
+
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(WIX_ARCH_SUFFIX "_x64")
+ELSE()
+ SET(WIX_ARCH_SUFFIX)
+ENDIF()
+
+IF(MSVC_VERSION EQUAL 1400)
+ SET(WIX35_MSVC_SUFFIX "_2005")
+ELSEIF(MSVC_VERSION EQUAL 1500)
+ SET(WIX35_MSVC_SUFFIX "_2008")
+ELSEIF(MSVC_VERSION EQUAL 1600)
+ SET(WIX35_MSVC_SUFFIX "_2010")
+ELSE()
+ # When next VS is out, add the correct version here
+ MESSAGE(FATAL_ERROR "Unknown VS version")
+ENDIF()
+
+FIND_LIBRARY(WIX_WCAUTIL_LIBRARY
+ NAMES wcautil${WIX_ARCH_SUFFIX} wcautil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
+ HINTS ${WIX_DIR}/../SDK/lib)
+
+FIND_LIBRARY(WIX_DUTIL_LIBRARY
+ NAMES dutil${WIX_ARCH_SUFFIX} dutil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
+ PATHS ${WIX_DIR}/../SDK/lib)
+
+ADD_VERSION_INFO(wixca SHARED WIXCA_SOURCES)
+ADD_LIBRARY(wixca SHARED EXCLUDE_FROM_ALL ${WIXCA_SOURCES})
+TARGET_LINK_LIBRARIES(wixca ${WIX_WCAUTIL_LIBRARY} ${WIX_DUTIL_LIBRARY}
+ msi version)