mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 08:50:53 +00:00
Fix the not found errors on DLLs
This commit is contained in:
parent
0412015469
commit
6020abab94
13 changed files with 37 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -353,6 +353,7 @@ if(${SRB2_CONFIG_HAVE_ZLIB})
|
|||
endif()
|
||||
if(${ZLIB_FOUND})
|
||||
set(SRB2_HAVE_ZLIB ON)
|
||||
add_definitions(-DHAVE_ZLIB)
|
||||
else()
|
||||
message(WARNING "You have specified that ZLIB is available but it was not found. SRB2 may not compile correctly.")
|
||||
endif()
|
||||
|
|
|
@ -274,17 +274,49 @@ if(${SDL2_FOUND})
|
|||
if(${CMAKE_SYSTEM} MATCHES Windows)
|
||||
set(win_extra_dll_list "")
|
||||
macro(getwinlib dllname defaultname)
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}")
|
||||
list(APPEND win_extra_dll_list ${SRB2_SDL2_DLL_${dllname}})
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
if (${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles")
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||
HINTS ${CMAKE_SOURCE_DIR}/Bin/Resources/x86_64
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/x86_64-w64-mingw32/bin
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/x86_64-w64-mingw32/bin
|
||||
)
|
||||
else()
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||
HINTS ${CMAKE_SOURCE_DIR}/Bin/Resources/i686
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/i686-w64-mingw32/bin
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/i686-w64-mingw32/bin
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||
HINTS ${CMAKE_SOURCE_DIR}/Bin/Resources/x86_64
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x64
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x64
|
||||
)
|
||||
else()
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}"
|
||||
HINTS ${CMAKE_SOURCE_DIR}/Bin/Resources/i686
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2/lib/x86
|
||||
HINTS ${CMAKE_SOURCE_DIR}/libs/SDL2_mixer/lib/x86
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND win_extra_dll_list ${SRB2_SDL2_DLL_${dllname}})
|
||||
else()
|
||||
find_library(SRB2_SDL2_DLL_${dllname} "${defaultname}")
|
||||
list(APPEND win_extra_dll_list ${SRB2_SDL2_DLL_${dllname}})
|
||||
endif()
|
||||
endmacro()
|
||||
getwinlib(SDL2 "SDL2.dll")
|
||||
if(${SRB2_CONFIG_SDL2_USEMIXER})
|
||||
getwinlib(SDL2_mixer "SDL2_mixer.dll")
|
||||
getwinlib(libmikmod-2 "libmikmod-2.dll")
|
||||
getwinlib(libogg_0 "libogg-0.dll")
|
||||
getwinlib(libvorbis_0 "libvorbis-0.dll")
|
||||
getwinlib(libvorbisfile_3 "libvorbisfile-3.dll")
|
||||
getwinlib(smpeg2 "smpeg2.dll")
|
||||
endif()
|
||||
if(${SRB2_CONFIG_HAVE_GME})
|
||||
getwinlib(libgme "libgme.dll")
|
||||
|
|
Loading…
Reference in a new issue