Fix compilation with CMake on Windows when some other building tool than

msbuild is used.
This commit is contained in:
arezey 2015-04-12 02:11:51 +03:00
parent 9f2b3efd13
commit a6287a4706

View file

@ -1158,10 +1158,17 @@ if( MSVC )
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"") set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"")
endif( ZDOOM_GENERATE_MAPFILE ) endif( ZDOOM_GENERATE_MAPFILE )
add_custom_command(TARGET zdoom POST_BUILD if( NO_GENERATOR_EXPRESSIONS )
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#1 add_custom_command(TARGET zdoom POST_BUILD
COMMENT "Adding manifest..." 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:$<TARGET_FILE:zdoom>
COMMENT "Adding manifest..."
)
endif( NO_GENERATOR_EXPRESSIONS )
create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} )
endif( MSVC ) endif( MSVC )