diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c31ca69c..ff29f27e7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1101,7 +1101,7 @@ if( MSVC ) option( ZDOOM_GENERATE_MAPFILE "Generate .map file for debugging." OFF ) if( ZDOOM_GENERATE_MAPFILE ) if( NOT MSVC80 ) - set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP:${ZDOOM_EXE_NAME}.map") + set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP:\"$(TargetDir)${ZDOOM_EXE_NAME}.map\"") else( NOT MSVC80 ) # 2005 doesn't support naming the map file. set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /MAP") endif( NOT MSVC80 )