From 4bcf0f20dd784efa686e1e58b70f25d1e56b5370 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 1 Feb 2023 16:55:44 +0100 Subject: [PATCH] Let CMake handle icinga-app/app.manifest by itself This BREAKS CMake < v3.4 on Windows. At least this works at all. --- icinga-app/CMakeLists.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/icinga-app/CMakeLists.txt b/icinga-app/CMakeLists.txt index 2ebfb17dd..22b25f4f8 100644 --- a/icinga-app/CMakeLists.txt +++ b/icinga-app/CMakeLists.txt @@ -2,6 +2,7 @@ if(MSVC) set(WindowsSources icinga.rc) + list(APPEND icinga_app_SOURCES app.manifest) else() set(WindowsSources "") endif() @@ -76,20 +77,6 @@ set_target_properties ( OUTPUT_NAME icinga2 ) -# Amend manifest to tell Windows that the application is DPI aware (needed for Windows 8.1 and up) -if(MSVC) - if(CMAKE_MAJOR_VERSION LESS 3) - MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE") - else() - ADD_CUSTOM_COMMAND( - TARGET icinga-app - POST_BUILD - COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\app.manifest\" -outputresource:\"icinga2\"\;\#1 - COMMENT "Adding OS version detection manifest..." - ) - endif() -endif(MSVC) - if(WIN32) set(InstallPath "${CMAKE_INSTALL_SBINDIR}") else()