From a6287a47068689f0732c5658d566e5940d3ab4e9 Mon Sep 17 00:00:00 2001 From: arezey Date: Sun, 12 Apr 2015 02:11:51 +0300 Subject: [PATCH] Fix compilation with CMake on Windows when some other building tool than msbuild is used. --- src/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6e43c0d46..98507327e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1158,10 +1158,17 @@ if( MSVC ) set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"") endif( ZDOOM_GENERATE_MAPFILE ) - add_custom_command(TARGET zdoom POST_BUILD - COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#1 - COMMENT "Adding manifest..." - ) + if( NO_GENERATOR_EXPRESSIONS ) + add_custom_command(TARGET zdoom POST_BUILD + COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#1 + COMMENT "Adding manifest..." + ) + else( NO_GENERATOR_EXPRESSIONS ) + add_custom_command(TARGET zdoom POST_BUILD + COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:$ + COMMENT "Adding manifest..." + ) + endif( NO_GENERATOR_EXPRESSIONS ) create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) endif( MSVC )