# Icinga 2
-# Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)
+# Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
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(