diff --git a/CMakeLists.txt b/CMakeLists.txt index e6374c252..fcf529a2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -586,6 +586,8 @@ if(WIN32) src/res/resource.h ) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/res/openclonk.manifest" "${CMAKE_CURRENT_BINARY_DIR}/openclonk.manifest" COPYONLY) + if(MINGW) # cmake does not support compiling resources with MinGW # natively, see http://www.cmake.org/Bug/view.php?id=4068. @@ -1162,6 +1164,11 @@ if(MSVC) oc_set_target_names(c4group) oc_set_target_names(c4script) oc_set_target_names(netpuncher) + + # cmake does not support embedding arbitrary manifests, + # so we add it to the resource file ourselves and tell + # MSVC not to create its own. + set_property(TARGET openclonk APPEND PROPERTY LINK_FLAGS "/MANIFEST:NO") endif() ############################################################################ diff --git a/src/res/engine.rc b/src/res/engine.rc index 4d0d2ec82..5d1493cf3 100644 --- a/src/res/engine.rc +++ b/src/res/engine.rc @@ -8,6 +8,18 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN #pragma code_page(1252) +///////////////////////////////////////////////////////////////////////////// +// +// Manifest +// +#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#endif +#ifndef RT_MANIFEST +#define RT_MANIFEST 24 +#endif +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "openclonk.manifest" + ///////////////////////////////////////////////////////////////////////////// // // Icons diff --git a/src/res/openclonk.manifest b/src/res/openclonk.manifest new file mode 100644 index 000000000..81f660f5a --- /dev/null +++ b/src/res/openclonk.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file