summaryrefslogtreecommitdiff
path: root/win/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'win/packaging')
-rw-r--r--win/packaging/CMakeLists.txt61
-rw-r--r--win/packaging/ca/CMakeLists.txt41
2 files changed, 45 insertions, 57 deletions
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt
index 95547ac9f3a..0535a486d57 100644
--- a/win/packaging/CMakeLists.txt
+++ b/win/packaging/CMakeLists.txt
@@ -17,35 +17,62 @@ IF(NOT WIN32)
RETURN()
ENDIF()
+IF(MSVC_VERSION LESS 1600)
+ RETURN()
+ENDIF()
+
+
+
SET(MANUFACTURER "MariaDB Corporation Ab")
FIND_PATH(WIX_DIR heat.exe
- $ENV{WIX_DIR}/bin
- $ENV{ProgramFiles}/wix/bin
- "$ENV{ProgramFiles}/Windows Installer XML v3/bin"
- "$ENV{ProgramFiles}/Windows Installer XML v3.5/bin"
- "$ENV{ProgramFiles}/Windows Installer XML v3.6/bin"
- "$ENV{WIX}/bin"
+ "$ENV{ProgramFiles}/WiX Toolset v3.9/bin"
+ "$ENV{ProgramFiles}/WiX Toolset v3.10/bin"
)
-
SET(CPACK_WIX_PACKAGE_BASE_NAME "MariaDB")
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(CPACK_WIX_UPGRADE_CODE "49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3")
- SET(CPACK_WIX_PACKAGE_NAME "MariaDB @MAJOR_VERSION@.@MINOR_VERSION@")
+ SET(CPACK_WIX_PACKAGE_NAME "MariaDB ${MAJOR_VERSION}.${MINOR_VERSION}")
ELSE()
SET(CPACK_WIX_UPGRADE_CODE "2331E7BD-EE58-431B-9E18-B2B918BCEB1B")
- SET(CPACK_WIX_PACKAGE_NAME "MariaDB @MAJOR_VERSION@.@MINOR_VERSION@ (x64)")
+ SET(CPACK_WIX_PACKAGE_NAME "MariaDB ${MAJOR_VERSION}.${MINOR_VERSION} (x64)")
ENDIF()
+IF(WIX_DIR)
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(WIX_ARCH_SUFFIX "x64")
+ELSE()
+ SET(WIX_ARCH_SUFFIX "x86")
+ENDIF()
+# Need some Wix SDK libraries to link with customaction
+IF(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1700 )
+ SET(WIX_MSVC_SUFFIX "VS2010")
+ELSEIF(MSVC_VERSION EQUAL 1800)
+ SET(WIX_MSVC_SUFFIX "VS2013")
+ELSEIF (MSVC_VERSION EQUAL 1900)
+ SET(WIX_MSVC_SUFFIX "VS2015")
+ENDIF()
+
+
+FIND_LIBRARY(WIX_WCAUTIL_LIBRARY
+ NAMES wcautil${WIX_ARCH_SUFFIX} wcautil${WIX_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
+ wcautil
+ PATHS
+ ${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/lib/${WIX_ARCH_SUFFIX}
+ )
+
+FIND_LIBRARY(WIX_DUTIL_LIBRARY
+ NAMES dutil${WIX_ARCH_SUFFIX}
+ dutil
+ PATHS
+ ${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/lib/${WIX_ARCH_SUFFIX}
+ )
+ENDIF()
-IF(NOT WIX_DIR)
- IF(NOT _WIX_DIR_CHECKED)
- SET(_WIX_DIR_CHECKED 1 CACHE INTERNAL "")
- MESSAGE(STATUS "Cannot find wix 3, installer project will not be generated")
- IF(BUILD_RELEASE)
+IF(NOT WIX_DUTIL_LIBRARY)
+ MESSAGE(STATUS "Cannot find wix 3, installer project will not be generated")
+ IF(BUILD_RELEASE)
MESSAGE(FATAL_ERROR
- "Can't find Wix. It is necessary for producing official package"
- )
- ENDIF()
+ "Can't find Wix. It is necessary for producing official package")
ENDIF()
RETURN()
ENDIF()
diff --git a/win/packaging/ca/CMakeLists.txt b/win/packaging/ca/CMakeLists.txt
index 0da1e5d67b1..04d5408b9c9 100644
--- a/win/packaging/ca/CMakeLists.txt
+++ b/win/packaging/ca/CMakeLists.txt
@@ -13,50 +13,11 @@
# 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)
-
+INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX_MSVC_SUFFIX}/inc)
SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(WIX_ARCH_SUFFIX "_x64")
- SET(WIX36_ARCH_SUFFIX "x64")
-ELSE()
- SET(WIX_ARCH_SUFFIX)
- SET(WIX36_ARCH_SUFFIX "x86")
-ENDIF()
-
-IF(MSVC_VERSION EQUAL 1400)
- SET(WIX35_MSVC_SUFFIX "_2005")
-ELSEIF(MSVC_VERSION EQUAL 1500)
- SET(WIX35_MSVC_SUFFIX "_2008")
- SET(WIX36_MSVC_SUFFIX "VS2008")
-ELSEIF(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1700 )
- SET(WIX35_MSVC_SUFFIX "_2010")
- SET(WIX36_MSVC_SUFFIX "VS2010")
-ELSE()
- # When next VS is out, add the correct version here
- MESSAGE(FATAL_ERROR "Unknown VS version")
-ENDIF()
-INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/inc)
-
-FIND_LIBRARY(WIX_WCAUTIL_LIBRARY
- NAMES wcautil${WIX_ARCH_SUFFIX} wcautil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
- wcautil
- PATHS
- ${WIX_DIR}/../SDK/lib
- ${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/lib/${WIX36_ARCH_SUFFIX})
-
-FIND_LIBRARY(WIX_DUTIL_LIBRARY
- NAMES dutil${WIX_ARCH_SUFFIX} dutil${WIX35_MSVC_SUFFIX}${WIX_ARCH_SUFFIX}
- dutil
- PATHS
- ${WIX_DIR}/../SDK/lib
- ${WIX_DIR}/../SDK/${WIX36_MSVC_SUFFIX}/lib/${WIX36_ARCH_SUFFIX}
- )
-
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}