Don't add /delayload for OpenAL stuff if OpenAL is disabled

- Also, I believe openal32.dll no longer needs a /delayload flag since
  it's dynamically loaded now.
This commit is contained in:
Randy Heit 2016-02-05 21:38:10 -06:00
parent d50e874d9b
commit 0892650465

View file

@ -1245,11 +1245,14 @@ endif()
if( MSVC )
option( ZDOOM_GENERATE_MAPFILE "Generate .map file for debugging." OFF )
set( LINKERSTUFF "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\"" )
if( ZDOOM_GENERATE_MAPFILE )
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /DELAYLOAD:\"openal32.dll\" /DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\" /MAP")
else()
set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO /DELAYLOAD:\"fmodex${X64}.dll\" /DELAYLOAD:\"openal32.dll\" /DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\"")
set( LINKERSTUFF ${LINKERSTUFF} "/MAP" )
endif()
if( NOT NO_OPENAL )
set( LINKERSTUFF ${LINKERSTUFF} "/DELAYLOAD:\"libmpg123-0.dll\" /DELAYLOAD:\"libsndfile-1.dll\"" )
endif()
set_target_properties(zdoom PROPERTIES LINK_FLAGS ${LINKERSTUFF})
add_custom_command(TARGET zdoom POST_BUILD
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$<TARGET_FILE:zdoom>\"\;\#1