Fix missing DLLs in Windows build

This commit is contained in:
sfan5 2024-04-15 16:16:15 +02:00
parent f2b5c35fa2
commit df2fd399df
2 changed files with 25 additions and 6 deletions

@ -272,9 +272,14 @@ if(WIN32)
if(NOT VCPKG_APPLOCAL_DEPS) if(NOT VCPKG_APPLOCAL_DEPS)
set(ZLIB_DLL "" CACHE FILEPATH "Path to Zlib DLL for installation (optional)") set(ZLIB_DLL "" CACHE FILEPATH "Path to Zlib DLL for installation (optional)")
set(ZSTD_DLL "" CACHE FILEPATH "Path to Zstd DLL for installation (optional)") set(ZSTD_DLL "" CACHE FILEPATH "Path to Zstd DLL for installation (optional)")
if(ENABLE_SOUND) if(BUILD_CLIENT)
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)") set(PNG_DLL "" CACHE FILEPATH "Path to libpng DLL for installation (optional)")
set(OGG_DLL "" CACHE FILEPATH "Path to libogg.dll for installation (optional)") set(JPEG_DLL "" CACHE FILEPATH "Path to libjpeg DLL for installation (optional)")
set(SDL2_DLL "" CACHE FILEPATH "Path to SDL2 DLL for installation (optional)")
endif()
if(BUILD_CLIENT AND ENABLE_SOUND)
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL DLL for installation (optional)")
set(OGG_DLL "" CACHE FILEPATH "Path to Ogg DLL for installation (optional)")
set(VORBIS_DLL "" CACHE FILEPATH "Path to Vorbis DLLs for installation (optional)") set(VORBIS_DLL "" CACHE FILEPATH "Path to Vorbis DLLs for installation (optional)")
endif() endif()
if(USE_GETTEXT) if(USE_GETTEXT)
@ -862,6 +867,20 @@ if(WIN32)
install(FILES ${VORBIS_DLL} DESTINATION ${BINDIR}) install(FILES ${VORBIS_DLL} DESTINATION ${BINDIR})
endif() endif()
endif() endif()
if(BUILD_CLIENT)
if(PNG_DLL)
install(FILES ${PNG_DLL} DESTINATION ${BINDIR})
endif()
if(JPEG_DLL)
install(FILES ${JPEG_DLL} DESTINATION ${BINDIR})
endif()
if(SDL2_DLL)
install(FILES ${SDL2_DLL} DESTINATION ${BINDIR})
endif()
if(FREETYPE_DLL)
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
endif()
endif()
if(CURL_DLL) if(CURL_DLL)
install(FILES ${CURL_DLL} DESTINATION ${BINDIR}) install(FILES ${CURL_DLL} DESTINATION ${BINDIR})
endif() endif()
@ -871,9 +890,6 @@ if(WIN32)
if(ZSTD_DLL) if(ZSTD_DLL)
install(FILES ${ZSTD_DLL} DESTINATION ${BINDIR}) install(FILES ${ZSTD_DLL} DESTINATION ${BINDIR})
endif() endif()
if(BUILD_CLIENT AND FREETYPE_DLL)
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
endif()
if(SQLITE3_DLL) if(SQLITE3_DLL)
install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR}) install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR})
endif() endif()

@ -82,11 +82,14 @@ add_cmake_libs () {
cmake_args+=( cmake_args+=(
-DPNG_LIBRARY=$libdir/libpng/lib/libpng.dll.a -DPNG_LIBRARY=$libdir/libpng/lib/libpng.dll.a
-DPNG_PNG_INCLUDE_DIR=$libdir/libpng/include -DPNG_PNG_INCLUDE_DIR=$libdir/libpng/include
-DPNG_DLL="$(_dlls $libdir/libpng/bin/*)"
-DJPEG_LIBRARY=$libdir/libjpeg/lib/libjpeg.dll.a -DJPEG_LIBRARY=$libdir/libjpeg/lib/libjpeg.dll.a
-DJPEG_INCLUDE_DIR=$libdir/libjpeg/include -DJPEG_INCLUDE_DIR=$libdir/libjpeg/include
-DJPEG_DLL="$(_dlls $libdir/libjpeg/bin/libjpeg*)"
-DCMAKE_PREFIX_PATH=$libdir/sdl2/lib/cmake -DCMAKE_PREFIX_PATH=$libdir/sdl2/lib/cmake
-DSDL2_DLL="$(_dlls $libdir/sdl2/bin/*)"
-DZLIB_INCLUDE_DIR=$libdir/zlib/include -DZLIB_INCLUDE_DIR=$libdir/zlib/include
-DZLIB_LIBRARY=$libdir/zlib/lib/libz.dll.a -DZLIB_LIBRARY=$libdir/zlib/lib/libz.dll.a