# Copyright (c) 2010, 2024, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is designed to work with certain software (including # but not limited to OpenSSL) that is licensed under separate terms, # as designated in a particular file or component or in included license # documentation. The authors of MySQL hereby grant you an additional # permission to link the program and your derivative works with the # separately licensed software that they have either included with # the program or referenced in the documentation. # # 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, version 2.0, 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 SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") SET(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") SET(WIX_EXECUTABLE "@WIX_EXECUTABLE@") SET(CMAKE_COMMAND "@CMAKE_COMMAND@") SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@") SET(VERSION "@VERSION@") SET(MAJOR_VERSION "@MAJOR_VERSION@") SET(MINOR_VERSION "@MINOR_VERSION@") SET(PATCH_VERSION "@PATCH_VERSION@") SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) SET(MANUFACTURER "@MANUFACTURER@") SET(LICENSE_RTF "@LICENSE_RTF@") SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@") SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@") SET(CPACK_MSI_SETUP "@CPACK_MSI_SETUP@") SET(PRODUCT_NAME "MySQL Router") SET(PRODUCT_DESCRIPTION "MySQL Router") SET(UPGRADE_CODE "0EC6E981-335C-4192-82E8-38EA36D0E8CF") SET(MySQLRouter_BINARY_STAGE_DIR "@MySQLRouter_BINARY_STAGE_DIR@") SET(CPACK_ROUTER_RESOURCE_FILE_LICENSE "@CPACK_ROUTER_RESOURCE_FILE_LICENSE@") SET(CPACK_ROUTER_RESOURCE_FILE_README "@CPACK_ROUTER_RESOURCE_FILE_README@") set(CPACK_ROUTER_PACKAGE_FILE_NAME "@CPACK_ROUTER_PACKAGE_FILE_NAME@") SET(CPACK_WIX_UI "WixUI_Minimal_Custom") INCLUDE(${CPACK_MSI_SETUP}) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/mysql_router.wxs.in ${CMAKE_CURRENT_BINARY_DIR}/mysql_router.wxs @ONLY) SET(EXTRA_WIX_ARGS) IF("$ENV{EXTRA_WIX_ARGS}") SET(EXTRA_WIX_ARGS "$ENV{EXTRA_WIX_ARGS}") ENDIF() EXECUTE_PROCESS( COMMAND ${WIX_EXECUTABLE} build -arch x64 -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext ${EXTRA_WIX_ARGS} -out ${CMAKE_BINARY_DIR}/${CPACK_ROUTER_PACKAGE_FILE_NAME}.msi mysql_router.wxs RESULT_VARIABLE WIX_RESULT OUTPUT_VARIABLE WIX_OUTPUT ERROR_VARIABLE WIX_OUTPUT ) IF(WIX_RESULT) MESSAGE(FATAL_ERROR "ERROR: can't run WiX: ${WIX_RESULT} ${WIX_OUTPUT}") ENDIF()