[Scummvm-git-logs] scummvm master -> 063209a962aa30c1b072636e55ece427de41bd67
lephilousophe
noreply at scummvm.org
Fri Jan 3 07:28:47 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
063209a962 BUILD: Fix build on mingw with libcurl
Commit: 063209a962aa30c1b072636e55ece427de41bd67
https://github.com/scummvm/scummvm/commit/063209a962aa30c1b072636e55ece427de41bd67
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2025-01-03T08:28:44+01:00
Commit Message:
BUILD: Fix build on mingw with libcurl
waitOnSocket in socket.cpp uses select, which is implemented in ws2_32.
Changed paths:
configure
devtools/create_project/cmake.cpp
diff --git a/configure b/configure
index 6cd7ba59a30..6b3760a1bc3 100755
--- a/configure
+++ b/configure
@@ -5756,6 +5756,10 @@ if test "$_libcurl" != "no"; then
darwin*)
LIBCURL_LIBS=`$_libcurlconfig --libs`
;;
+ mingw*)
+ # Needed for select (used in socket.cpp), when curl is linked dynamically
+ append_var LIBCURL_LIBS "-lws2_32"
+ ;;
psp2*)
append_var LIBCURL_LIBS "-lssl -lcrypto"
;;
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index aa7d457b2bb..4dd43dfe9d0 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -43,7 +43,7 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
{ "jpeg", "libjpeg", kSDLVersionAny, "FindJPEG", "JPEG", "JPEG_INCLUDE_DIRS", "JPEG_LIBRARIES", nullptr, nullptr },
{ "mpeg2", "libmpeg2", kSDLVersionAny, "FindMPEG2", "MPEG2", "MPEG2_INCLUDE_DIRS", "MPEG2_mpeg2_LIBRARY", nullptr, nullptr },
{ "opengl", nullptr, kSDLVersionAny, "FindOpenGL", "OpenGL", "OPENGL_INCLUDE_DIR", "OPENGL_gl_LIBRARY", nullptr, nullptr },
- { "libcurl", "libcurl", kSDLVersionAny, "FindCURL", "CURL", "CURL_INCLUDE_DIRS", "CURL_LIBRARIES", nullptr, nullptr },
+ { "libcurl", "libcurl", kSDLVersionAny, "FindCURL", "CURL", "CURL_INCLUDE_DIRS", "CURL_LIBRARIES", nullptr, "ws2_32" },
{ "sdlnet", nullptr, kSDLVersion1, "FindSDL_net", "SDL_net", "SDL_NET_INCLUDE_DIRS", "SDL_NET_LIBRARIES", nullptr, nullptr },
LibraryProps("sdlnet", "SDL2_net", kSDLVersion2).Libraries("SDL2_net"),
LibraryProps("flac", "flac").Libraries("FLAC"),
@@ -323,6 +323,10 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string
project << "if (WIN32)\n";
project << "\ttarget_sources(" << name << " PUBLIC " << setup.filePrefix << "/dists/" << name << ".rc)\n";
project << "\ttarget_link_libraries(" << name << " winmm)\n";
+ // Needed for select (used in socket.cpp), when curl is linked dynamically
+ project << "\tif (libcurl_FOUND)\n";
+ project << "\t\ttarget_link_libraries(" << name << " ws2_32)\n";
+ project << "\tendif()\n";
project << "endif()\n";
project << "\n";
More information about the Scummvm-git-logs
mailing list