- Restored dependency on dxguid library for MinGW.

This commit is contained in:
drfrag666 2018-04-22 18:50:12 +02:00
parent 2a41088fb6
commit 54e8bf74ce

View file

@ -96,6 +96,11 @@ if( WIN32 )
find_library( DX_dinput8_LIBRARY dinput8
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
find_library( DX_dxguid_LIBRARY dxguid
PATHS ENV DXSDK_DIR
PATH_SUFFIXES Lib Lib/${XBITS} )
endif()
# Modern versions of the Windows SDK include dinput8.lib. Unfortunately,
# CMake cannot find these libraries via find_library.
@ -104,6 +109,13 @@ if( WIN32 )
set( DX_dinput8_LIBRARY dinput8 )
endif()
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
# Modern versions of the Windows SDK do NOT include dxguid.lib. Its contents
# were moved to dinput8.lib.
if( NOT DX_dxguid_LIBRARY )
message( STATUS "Could not find dxguid.lib. Build may fail on old Windows SDKs.")
endif()
endif()
endif()
set( ZDOOM_LIBS
@ -124,6 +136,11 @@ if( WIN32 )
set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp )
endif()
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
if( DX_dxguid_LIBRARY )
list( APPEND ZDOOM_LIBS "${DX_dxguid_LIBRARY}" )
endif()
endif()
else()
if( APPLE )
set( NO_GTK ON )