diff --git a/CMakeLists.txt b/CMakeLists.txt index f64ddee4e..09d6da840 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,6 +306,8 @@ set(CPACK_WIX_UPGRADE_GUID "52F2BEAA-4DF0-4C3E-ABDC-C0F61DE4DF8A") set(CPACK_WIX_EXTENSIONS "WixUtilExtension") set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/bannrbmp.bmp") set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/icinga-installer/dlgbmp.bmp") +set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.Debug") +set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch") set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) include(InstallRequiredSystemLibraries) diff --git a/icinga-installer/CMakeLists.txt b/icinga-installer/CMakeLists.txt index 967e65cca..0c32bade3 100644 --- a/icinga-installer/CMakeLists.txt +++ b/icinga-installer/CMakeLists.txt @@ -35,7 +35,13 @@ set_target_properties( target_link_libraries(icinga-installer shlwapi) install(CODE " -set(CPACK_WIX_PATCH_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/icinga-installer/icinga2.wixpatch.\${BUILD_TYPE}\") + execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch.\${BUILD_TYPE}\" + \"${CMAKE_CURRENT_BINARY_DIR}/icinga2.wixpatch\" + RESULT_VARIABLE copy_result + ERROR_VARIABLE error_output) + if(copy_result) + message(FATAL_ERROR \${error_output}) + endif() ") file(