diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-07-06 04:03:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-08-12 11:37:42 +0200 |
commit | 6b53f9d781cc19cbec96c3eb048e6407021685a2 (patch) | |
tree | 71379cc76e9f8294ccabca3a40ed2e7d509c7c5a /win | |
parent | 96b8909062c0b4df654f11057905b1e31398f88f (diff) | |
download | mariadb-git-6b53f9d781cc19cbec96c3eb048e6407021685a2.tar.gz |
MDEV-16662 CMake warnings: CMP0026
Diffstat (limited to 'win')
-rw-r--r-- | win/packaging/CMakeLists.txt | 73 | ||||
-rw-r--r-- | win/packaging/create_msi.cmake (renamed from win/packaging/create_msi.cmake.in) | 54 | ||||
-rw-r--r-- | win/packaging/extra.wxs.in | 4 | ||||
-rw-r--r-- | win/packaging/heidisql.cmake | 6 | ||||
-rw-r--r-- | win/upgrade_wizard/CMakeLists.txt | 3 |
5 files changed, 71 insertions, 69 deletions
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt index d5dc3becba8..61bfe9e5568 100644 --- a/win/packaging/CMakeLists.txt +++ b/win/packaging/CMakeLists.txt @@ -123,11 +123,9 @@ ELSE() FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "\n}\n") SET(COPYING_RTF "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf") ENDIF() -GET_TARGET_PROPERTY(WIXCA_LOCATION wixca LOCATION) SET(CPACK_WIX_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake) -GET_TARGET_PROPERTY(upgrade_wizard_location mysql_upgrade_wizard LOCATION) -IF(NOT upgrade_wizard_location) +IF(NOT TARGET mysql_upgrade_wizard) SET(EXTRA_WIX_PREPROCESSOR_FLAGS "-dHaveUpgradeWizard=0") ENDIF() IF(WITH_INNOBASE_STORAGE_ENGINE) @@ -145,7 +143,6 @@ IF(WITH_THIRD_PARTY) ENDIF() ENDIF() -GET_TARGET_PROPERTY(LIBMYSQL_LOCATION libmysql LOCATION) FOREACH(third_party ${WITH_THIRD_PARTY}) SET(third_party_install_plugin ${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) IF(NOT EXISTS ${third_party_install_plugin}) @@ -169,10 +166,6 @@ ENDIF() IF(NOT CPACK_WIX_UI) SET(CPACK_WIX_UI "MyWixUI_Mondo") ENDIF() -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake - @ONLY) - IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(WixWin64 " Win64='yes'") @@ -188,17 +181,69 @@ ENDIF() ADD_CUSTOM_TARGET( MSI - COMMAND ${CMAKE_COMMAND} - ${CONFIG_PARAM} - -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake + COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} + -DCANDLE_EXECUTABLE="${CANDLE_EXECUTABLE}" + -DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}" + -DCMAKE_FULL_VER="${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" + -DCMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P} + -DCOPYING_RTF="${COPYING_RTF}" + -DCPACK_WIX_CONFIG="${CPACK_WIX_CONFIG}" + -DCPACK_WIX_INCLUDE="${CPACK_WIX_INCLUDE}" + -DCPACK_WIX_PACKAGE_BASE_NAME="${CPACK_WIX_PACKAGE_BASE_NAME}" + -DCPACK_WIX_PACKAGE_NAME="${CPACK_WIX_PACKAGE_NAME}" + -DCPACK_WIX_UPGRADE_CODE="${CPACK_WIX_UPGRADE_CODE}" + -DEXTRA_WIX_PREPROCESSOR_FLAGS="${EXTRA_WIX_PREPROCESSOR_FLAGS}" + -DLIGHT_EXECUTABLE="${LIGHT_EXECUTABLE}" + -DMAJOR_VERSION="${MAJOR_VERSION}" + -DMANUFACTURER="${MANUFACTURER}" + -DMINOR_VERSION="${MINOR_VERSION}" + -DPATCH_VERSION="${PATCH_VERSION}" + -DSIGNCODE="${SIGNCODE}" + -DSIGNTOOL_EXECUTABLE="${SIGNTOOL_EXECUTABLE}" + -DSIGNTOOL_PARAMETERS="${SIGNTOOL_PARAMETERS}" + -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" + -DTHIRD_PARTY_DOWNLOAD_LOCATION="${THIRD_PARTY_DOWNLOAD_LOCATION}" + -DTHIRD_PARTY_FEATURE_CONDITION="${THIRD_PARTY_FEATURE_CONDITION}" + -DTINY_VERSION="${TINY_VERSION}" + -DTOP_BINDIR="${CMAKE_BINARY_DIR}" + -DVERSION="${VERSION}" + -DWITH_THIRD_PARTY="${WITH_THIRD_PARTY}" + -DWIXCA_LOCATION="$<TARGET_FILE:wixca>" + -P ${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake ) ADD_DEPENDENCIES(MSI wixca) ADD_CUSTOM_TARGET( MSI_ESSENTIALS - COMMAND ${CMAKE_COMMAND} -DESSENTIALS=1 - ${CONFIG_PARAM} - -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake + COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DESSENTIALS=1 + -DCANDLE_EXECUTABLE="${CANDLE_EXECUTABLE}" + -DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}" + -DCMAKE_FULL_VER="${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" + -DCMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P} + -DCOPYING_RTF="${COPYING_RTF}" + -DCPACK_WIX_CONFIG="${CPACK_WIX_CONFIG}" + -DCPACK_WIX_INCLUDE="${CPACK_WIX_INCLUDE}" + -DCPACK_WIX_PACKAGE_BASE_NAME="${CPACK_WIX_PACKAGE_BASE_NAME}" + -DCPACK_WIX_PACKAGE_NAME="${CPACK_WIX_PACKAGE_NAME}" + -DCPACK_WIX_UPGRADE_CODE="${CPACK_WIX_UPGRADE_CODE}" + -DEXTRA_WIX_PREPROCESSOR_FLAGS="${EXTRA_WIX_PREPROCESSOR_FLAGS}" + -DLIGHT_EXECUTABLE="${LIGHT_EXECUTABLE}" + -DMAJOR_VERSION="${MAJOR_VERSION}" + -DMANUFACTURER="${MANUFACTURER}" + -DMINOR_VERSION="${MINOR_VERSION}" + -DPATCH_VERSION="${PATCH_VERSION}" + -DSIGNCODE="${SIGNCODE}" + -DSIGNTOOL_EXECUTABLE="${SIGNTOOL_EXECUTABLE}" + -DSIGNTOOL_PARAMETERS="${SIGNTOOL_PARAMETERS}" + -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" + -DTHIRD_PARTY_DOWNLOAD_LOCATION="${THIRD_PARTY_DOWNLOAD_LOCATION}" + -DTHIRD_PARTY_FEATURE_CONDITION="${THIRD_PARTY_FEATURE_CONDITION}" + -DTINY_VERSION="${TINY_VERSION}" + -DTOP_BINDIR="${CMAKE_BINARY_DIR}" + -DVERSION="${VERSION}" + -DWITH_THIRD_PARTY="${WITH_THIRD_PARTY}" + -DWIXCA_LOCATION="$<TARGET_FILE:wixca>" + -P ${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake ) ADD_DEPENDENCIES(MSI_ESSENTIALS wixca) diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake index c37f7ca9d1d..f0407684ff3 100644 --- a/win/packaging/create_msi.cmake.in +++ b/win/packaging/create_msi.cmake @@ -1,35 +1,3 @@ -SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") -SET(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@") -SET(CANDLE_EXECUTABLE "@CANDLE_EXECUTABLE@") -SET(LIGHT_EXECUTABLE "@LIGHT_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(TINY_VERSION "@TINY_VERSION@") -SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) -SET(MANUFACTURER "@MANUFACTURER@") -SET(WIXCA_LOCATION "@WIXCA_LOCATION@") -SET(COPYING_RTF "@COPYING_RTF@") -SET(CPACK_WIX_CONFIG "@CPACK_WIX_CONFIG@") -SET(CPACK_WIX_INCLUDE "@CPACK_WIX_INCLUDE@") -SET(CPACK_WIX_UPGRADE_CODE "@CPACK_WIX_UPGRADE_CODE@") -SET(CPACK_WIX_PACKAGE_NAME "@CPACK_WIX_PACKAGE_NAME@") -SET(CPACK_WIX_PACKAGE_BASE_NAME "@CPACK_WIX_PACKAGE_BASE_NAME@") -SET(SIGNCODE "@SIGNCODE@") -SET(SIGNTOOL_EXECUTABLE "@SIGNTOOL_EXECUTABLE@") -SET(SIGNTOOL_PARAMETERS "@SIGNTOOL_PARAMETERS@") -SET(CMAKE_FULL_VER - "@CMAKE_MAJOR_VERSION@.@CMAKE_MINOR_VERSION@.@CMAKE_PATCH_VERSION@") -SET(EXTRA_WIX_PREPROCESSOR_FLAGS "@EXTRA_WIX_PREPROCESSOR_FLAGS@") -SET(WITH_THIRD_PARTY "@WITH_THIRD_PARTY@") -SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@") -SET(THIRD_PARTY_FEATURE_CONDITION "@THIRD_PARTY_FEATURE_CONDITION@") -SET(LIBMYSQL_LOCATION "@LIBMYSQL_LOCATION@") - - MACRO(MAKE_WIX_IDENTIFIER str varname) STRING(REPLACE "/" "." ${varname} "${str}") STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}") @@ -45,19 +13,15 @@ MACRO(MAKE_WIX_IDENTIFIER str varname) ENDMACRO() SET($ENV{VS_UNICODE_OUTPUT} "") -IF(LIBMYSQL_LOCATION AND CMAKE_CFG_INTDIR) - # resolve libmysql full path - STRING(REPLACE "${CMAKE_CFG_INTDIR}" "${CMAKE_INSTALL_CONFIG_NAME}" LIBMYSQL_LOCATION "${LIBMYSQL_LOCATION}") -ENDIF() - + FOREACH(third_party ${WITH_THIRD_PARTY}) - INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) + INCLUDE(${SRCDIR}/${third_party}.cmake) # Check than above script produced ${third_party}.wxi and ${third_party}_feature.wxi FOREACH(outfile ${third_party}.wxi ${third_party}_feature.wxi) IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${outfile}) MESSAGE(FATAL_ERROR - "${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake did not produce " + "${SRCDIR}/${third_party}.cmake did not produce " "${CMAKE_CURRENT_BINARY_DIR}/${outfile}" ) ENDIF() @@ -79,7 +43,7 @@ ENDIF() SET(ENV{VS_UNICODE_OUTPUT}) -INCLUDE(${CMAKE_BINARY_DIR}/CPackConfig.cmake) +INCLUDE(${TOP_BINDIR}/CPackConfig.cmake) IF(CPACK_WIX_CONFIG) INCLUDE(${CPACK_WIX_CONFIG}) @@ -101,13 +65,13 @@ FOREACH(comp ${COMPONENTS_ALL}) SET(ENV{DESTDIR} testinstall/${comp}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -DCMAKE_INSTALL_COMPONENT=${comp} - -DCMAKE_INSTALL_PREFIX= -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + -DCMAKE_INSTALL_PREFIX= -P ${TOP_BINDIR}/cmake_install.cmake OUTPUT_QUIET ) # Exclude empty install components SET(INCLUDE_THIS_COMPONENT 1) - SET(MANIFEST_FILENAME "${CMAKE_BINARY_DIR}/install_manifest_${comp}.txt") + SET(MANIFEST_FILENAME "${TOP_BINDIR}/install_manifest_${comp}.txt") IF(EXISTS ${MANIFEST_FILENAME}) FILE(READ ${MANIFEST_FILENAME} content) STRING(LENGTH "${content}" content_length) @@ -385,9 +349,9 @@ SET(CPACK_WIX_INCLUDES ENDFOREACH() -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in +CONFIGURE_FILE(${SRCDIR}/mysql_server.wxs.in ${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/extra.wxs.in +CONFIGURE_FILE(${SRCDIR}/extra.wxs.in ${CMAKE_CURRENT_BINARY_DIR}/extra.wxs) SET(EXTRA_CANDLE_ARGS "$ENV{EXTRA_CANDLE_ARGS}") @@ -432,6 +396,6 @@ IF(SIGNCODE) ) ENDIF() CONFIGURE_FILE(${CPACK_PACKAGE_FILE_NAME}.msi - ${CMAKE_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.msi + ${TOP_BINDIR}/${CPACK_PACKAGE_FILE_NAME}.msi COPYONLY) diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in index 819bcc36ecb..a71ef982896 100644 --- a/win/packaging/extra.wxs.in +++ b/win/packaging/extra.wxs.in @@ -71,8 +71,8 @@ <!-- User interface dialogs --> - <WixVariable Id='WixUIBannerBmp' Value='@CMAKE_CURRENT_SOURCE_DIR@\WixUIBannerBmp.jpg' /> - <WixVariable Id='WixUIDialogBmp' Value='@CMAKE_CURRENT_SOURCE_DIR@\WixUIDialogBmp.jpg' /> + <WixVariable Id='WixUIBannerBmp' Value='@SRCDIR@\WixUIBannerBmp.jpg' /> + <WixVariable Id='WixUIDialogBmp' Value='@SRCDIR@\WixUIDialogBmp.jpg' /> <UI> <!-- Dialog on uninstall of the database --> diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake index 569ae4d8ed5..77a0bc05e70 100644 --- a/win/packaging/heidisql.cmake +++ b/win/packaging/heidisql.cmake @@ -13,11 +13,5 @@ IF(NOT EXISTS ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP}) ENDIF() SET(LIBMYSQLDLL_SOURCE ${HEIDISQL_DOWNLOAD_DIR}/libmysql.dll) -IF(CMAKE_SIZEOF_VOID_P EQUAL 4) - # Use our libmysql if it is 32 bit. - IF(LIBMYSQL_LOCATION) - SET(LIBMYSQLDLL_SOURCE "${LIBMYSQL_LOCATION}") - ENDIF() -ENDIF() CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql.wxi) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql_feature.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql_feature.wxi) diff --git a/win/upgrade_wizard/CMakeLists.txt b/win/upgrade_wizard/CMakeLists.txt index 81c9c0d572c..f4148ee98d2 100644 --- a/win/upgrade_wizard/CMakeLists.txt +++ b/win/upgrade_wizard/CMakeLists.txt @@ -46,9 +46,8 @@ SET_TARGET_PROPERTIES(mysql_upgrade_wizard PROPERTIES WIN32_EXECUTABLE 1) # to change service configuration. Due to a CMake bug http://www.vtk.org/Bug/view.php?id=11171 # it is not possible currenly to do it with linker flags. Work around is to use # manifest tool mt.exe and embed the manifest post-build. -GET_TARGET_PROPERTY(upgrade_wizard_location mysql_upgrade_wizard LOCATION) ADD_CUSTOM_COMMAND( TARGET mysql_upgrade_wizard POST_BUILD COMMAND mt.exe -manifest ${CMAKE_CURRENT_SOURCE_DIR}/upgrade_wizard.exe.manifest - "-outputresource:${upgrade_wizard_location};#1" + "-outputresource:$<TARGET_FILE:mysql_upgrade_wizard>;#1" ) |