[Scummvm-git-logs] scummvm master -> 5214c04718d82f78bbe70c4d82eee3d6d5143d75
sev-
noreply at scummvm.org
Thu Mar 16 14:08:16 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
45dde26fc5 CREATE_PROJECT: Simplify feature libraries initialization
6fb159f3f3 CREATE_PROJECT: Support Windows specific libraries for features
5214c04718 CREATE_PROJECT: Add required libraries for enet on Windows/CMake
Commit: 45dde26fc525ac944547dbe940ab4da581e231dc
https://github.com/scummvm/scummvm/commit/45dde26fc525ac944547dbe940ab4da581e231dc
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2023-03-16T15:08:08+01:00
Commit Message:
CREATE_PROJECT: Simplify feature libraries initialization
Changed paths:
devtools/create_project/cmake.cpp
devtools/create_project/cmake.h
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 5907d3445d1..d5cbb78f7e0 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -42,22 +42,22 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
{ "png", "libpng", kSDLVersionAny, "FindPNG", "PNG", "PNG_INCLUDE_DIRS", "PNG_LIBRARIES", nullptr },
{ "jpeg", "libjpeg", kSDLVersionAny, "FindJPEG", "JPEG", "JPEG_INCLUDE_DIRS", "JPEG_LIBRARIES", nullptr },
{ "mpeg2", "libmpeg2", kSDLVersionAny, "FindMPEG2", "MPEG2", "MPEG2_INCLUDE_DIRS", "MPEG2_mpeg2_LIBRARY", nullptr },
- { "flac", "flac", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "FLAC" },
- { "mad", "mad", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "mad" },
- { "ogg", "ogg", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "ogg" },
- { "vorbis", "vorbisfile vorbis", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "vorbisfile vorbis" },
- { "tremor", "vorbisidec", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "vorbisidec" },
- { "theoradec", "theoradec", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "theoradec" },
- { "vpx", "vpx", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "vpx" },
- { "fluidsynth", "fluidsynth", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "fluidsynth" },
- { "faad", "faad2", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "faad" },
- { "fribidi", "fribidi", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "fribidi" },
- { "discord", "discord", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "discord-rpc"},
{ "opengl", nullptr, kSDLVersionAny, "FindOpenGL", "OpenGL", "OPENGL_INCLUDE_DIR", "OPENGL_gl_LIBRARY", nullptr },
{ "libcurl", "libcurl", kSDLVersionAny, "FindCURL", "CURL", "CURL_INCLUDE_DIRS", "CURL_LIBRARIES", nullptr },
{ "sdlnet", nullptr, kSDLVersion1, "FindSDL_net", "SDL_net", "SDL_NET_INCLUDE_DIRS", "SDL_NET_LIBRARIES", nullptr },
- { "sdlnet", "SDL2_net", kSDLVersion2, nullptr, nullptr, nullptr, nullptr, "SDL2_net" },
- { "retrowave", "retrowave", kSDLVersionAny, nullptr, nullptr, nullptr, nullptr, "retrowave" }
+ LibraryProps("sdlnet", "SDL2_net", kSDLVersion2).Libraries("SDL2_net"),
+ LibraryProps("flac", "flac").Libraries("FLAC"),
+ LibraryProps("mad", "mad").Libraries("mad"),
+ LibraryProps("ogg", "ogg").Libraries("ogg"),
+ LibraryProps("vorbis", "vorbisfile vorbis").Libraries("vorbisfile vorbis"),
+ LibraryProps("tremor", "vorbisidec").Libraries("vorbisidec"),
+ LibraryProps("theoradec", "theoradec").Libraries("theoradec"),
+ LibraryProps("vpx", "vpx").Libraries("vpx"),
+ LibraryProps("fluidsynth", "fluidsynth").Libraries("fluidsynth"),
+ LibraryProps("faad", "faad2").Libraries("faad"),
+ LibraryProps("fribidi", "fribidi").Libraries("fribidi"),
+ LibraryProps("discord", "discord").Libraries("discord-rpc"),
+ LibraryProps("retrowave", "retrowave").Libraries("retrowave")
};
for (unsigned int i = 0; i < sizeof(s_libraries) / sizeof(s_libraries[0]); i++) {
diff --git a/devtools/create_project/cmake.h b/devtools/create_project/cmake.h
index 520c521202d..37859072fac 100644
--- a/devtools/create_project/cmake.h
+++ b/devtools/create_project/cmake.h
@@ -75,6 +75,13 @@ private:
const char *libraries;
};
+ struct LibraryProps : Library {
+ LibraryProps(const char *_feature, const char *_pkgConfig = nullptr, SDLVersion _sdlVersion = kSDLVersionAny) :
+ Library({_feature, _pkgConfig, _sdlVersion, nullptr}) {}
+ LibraryProps &LibrariesVar(const char *var) { librariesVar = var; return *this; }
+ LibraryProps &Libraries(const char *libs) { libraries = libs; return *this; }
+ };
+
const Library *getLibraryFromFeature(const char *feature, bool useSDL2) const;
void writeWarnings(std::ofstream &output) const;
Commit: 6fb159f3f39e2b16001227aa05bc9453fe80c353
https://github.com/scummvm/scummvm/commit/6fb159f3f39e2b16001227aa05bc9453fe80c353
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2023-03-16T15:08:08+01:00
Commit Message:
CREATE_PROJECT: Support Windows specific libraries for features
Use it for tts instead of the current hack.
Changed paths:
devtools/create_project/cmake.cpp
devtools/create_project/cmake.h
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index d5cbb78f7e0..6c553f3d254 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -57,6 +57,7 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
LibraryProps("faad", "faad2").Libraries("faad"),
LibraryProps("fribidi", "fribidi").Libraries("fribidi"),
LibraryProps("discord", "discord").Libraries("discord-rpc"),
+ LibraryProps("tts").WinLibraries("sapi ole32"),
LibraryProps("retrowave", "retrowave").Libraries("retrowave")
};
@@ -90,7 +91,7 @@ set(SCUMMVM_LIBS)
macro(find_feature)
set(_OPTIONS_ARGS)
set(_ONE_VALUE_ARGS name findpackage_name include_dirs_var libraries_var)
- set(_MULTI_VALUE_ARGS pkgconfig_name libraries)
+ set(_MULTI_VALUE_ARGS pkgconfig_name libraries win_libraries)
cmake_parse_arguments(_feature "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN})
if (_feature_pkgconfig_name AND PKG_CONFIG_FOUND)
@@ -112,6 +113,9 @@ macro(find_feature)
if (_feature_libraries)
list(APPEND SCUMMVM_LIBS ${_feature_libraries})
endif()
+ if (WIN32 AND _feature_win_libraries)
+ list(APPEND SCUMMVM_LIBS ${_feature_win_libraries})
+ endif()
endif()
endmacro()
@@ -213,6 +217,10 @@ void CMakeProvider::writeFeatureLibSearch(const BuildSetup &setup, std::ofstream
workspace << " libraries ";
workspace << library->libraries;
}
+ if (library->winLibraries) {
+ workspace << " win_libraries ";
+ workspace << library->winLibraries;
+ }
workspace << ")\n";
}
}
@@ -301,12 +309,6 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string
project << "endif()\n";
project << "\n";
- if (getFeatureBuildState("tts", setup.features)) {
- project << "if (WIN32)\n";
- project << "\ttarget_link_libraries(" << name << " sapi ole32)\n";
- project << "endif()\n";
- }
-
project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD 11)\n";
project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD_REQUIRED ON)\n";
}
diff --git a/devtools/create_project/cmake.h b/devtools/create_project/cmake.h
index 37859072fac..b7ffacbfc24 100644
--- a/devtools/create_project/cmake.h
+++ b/devtools/create_project/cmake.h
@@ -73,6 +73,7 @@ private:
const char *includesVar;
const char *librariesVar;
const char *libraries;
+ const char *winLibraries;
};
struct LibraryProps : Library {
@@ -80,6 +81,7 @@ private:
Library({_feature, _pkgConfig, _sdlVersion, nullptr}) {}
LibraryProps &LibrariesVar(const char *var) { librariesVar = var; return *this; }
LibraryProps &Libraries(const char *libs) { libraries = libs; return *this; }
+ LibraryProps &WinLibraries(const char *libs) { winLibraries = libs; return *this; }
};
const Library *getLibraryFromFeature(const char *feature, bool useSDL2) const;
Commit: 5214c04718d82f78bbe70c4d82eee3d6d5143d75
https://github.com/scummvm/scummvm/commit/5214c04718d82f78bbe70c4d82eee3d6d5143d75
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2023-03-16T15:08:08+01:00
Commit Message:
CREATE_PROJECT: Add required libraries for enet on Windows/CMake
Changed paths:
devtools/create_project/cmake.cpp
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 6c553f3d254..4e64ff99444 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -58,6 +58,7 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
LibraryProps("fribidi", "fribidi").Libraries("fribidi"),
LibraryProps("discord", "discord").Libraries("discord-rpc"),
LibraryProps("tts").WinLibraries("sapi ole32"),
+ LibraryProps("enet").WinLibraries("winmm ws2_32"),
LibraryProps("retrowave", "retrowave").Libraries("retrowave")
};
More information about the Scummvm-git-logs
mailing list