mirror of
https://github.com/libretro/scummvm.git
synced 2025-05-13 09:36:21 +00:00
CREATE_PROJECT: Set MSVC default subsystem to CONSOLE
MSVC builds now use the CONSOLE subsystem by default, just like all our other Windows builds. --use-windows-subsystem is now available to generate projects with the WINDOWS subsystem.
This commit is contained in:
parent
61cca4f30e
commit
335f90b136
@ -303,6 +303,8 @@ int main(int argc, char *argv[]) {
|
||||
setup.useWindowsUnicode = true;
|
||||
} else if (!std::strcmp(argv[i], "--use-windows-ansi")) {
|
||||
setup.useWindowsUnicode = false;
|
||||
} else if (!std::strcmp(argv[i], "--use-windows-subsystem")) {
|
||||
setup.useWindowsSubsystem = true;
|
||||
} else if (!std::strcmp(argv[i], "--use-xcframework")) {
|
||||
setup.useXCFramework = true;
|
||||
} else if (!std::strcmp(argv[i], "--vcpkg")) {
|
||||
@ -753,6 +755,7 @@ void displayHelp(const char *exe) {
|
||||
" (default: true)\n"
|
||||
" --use-windows-ansi Use Windows ANSI APIs\n"
|
||||
" (default: false)\n"
|
||||
" --use-windows-subsystem Use Windows subsystem instead of Console\n"
|
||||
" --libs-path path Specify the path of pre-built libraries instead of using the\n"
|
||||
" " LIBS_DEFINE " environment variable\n "
|
||||
" --vcpkg Use vcpkg-provided libraries instead of pre-built libraries\n"
|
||||
|
@ -248,6 +248,7 @@ struct BuildSetup {
|
||||
bool useSDL2; ///< Whether to use SDL2 or not.
|
||||
bool useStaticDetection; ///< Whether to link detection features inside the executable or not.
|
||||
bool useWindowsUnicode; ///< Whether to use Windows Unicode APIs or ANSI APIs.
|
||||
bool useWindowsSubsystem; ///< Whether to use Windows subsystem or Console subsystem (default: Console)
|
||||
bool useXCFramework; ///< Whether to use Apple XCFrameworks instead of static libraries
|
||||
bool useVcpkg; ///< Whether to load libraries from vcpkg or SCUMMVM_LIBS
|
||||
|
||||
@ -259,6 +260,7 @@ struct BuildSetup {
|
||||
useSDL2 = true;
|
||||
useStaticDetection = true;
|
||||
useWindowsUnicode = true;
|
||||
useWindowsSubsystem = false;
|
||||
useXCFramework = false;
|
||||
useVcpkg = false;
|
||||
}
|
||||
|
@ -416,10 +416,11 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
|
||||
<< "\t\t</ClCompile>\n"
|
||||
<< "\t\t<Link>\n"
|
||||
<< "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n";
|
||||
if (!setup.featureEnabled("text-console") && !setup.devTools && !setup.tests) {
|
||||
properties << "\t\t\t<SubSystem>Windows</SubSystem>\n";
|
||||
} else {
|
||||
// console subsystem is required for text-console, tools, and tests
|
||||
if (!setup.useWindowsSubsystem || setup.featureEnabled("text-console") || setup.devTools || setup.tests) {
|
||||
properties << "\t\t\t<SubSystem>Console</SubSystem>\n";
|
||||
} else {
|
||||
properties << "\t\t\t<SubSystem>Windows</SubSystem>\n";
|
||||
}
|
||||
|
||||
if (!setup.devTools && !setup.tests)
|
||||
|
Loading…
x
Reference in New Issue
Block a user