CREATE_PROJECT: Remove deprecated --use-canonical-lib-names
It's always the default
This commit is contained in:
parent
d71a717b87
commit
e396d34320
7 changed files with 40 additions and 52 deletions
|
@ -47,7 +47,7 @@ static const char *const FILENAMES[] = {
|
|||
"metaengine.h", "module.mk", "xyzzy.cpp",
|
||||
"xyzzy.h", "POTFILES", nullptr
|
||||
};
|
||||
const char *const ENGINES = "create_project ..\\.. --use-canonical-lib-names --msvc\n";
|
||||
const char *const ENGINES = "create_project ..\\.. --msvc\n";
|
||||
|
||||
bool fileExists(const char *name) {
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -298,7 +298,7 @@ int main(int argc, char *argv[]) {
|
|||
} else if (!std::strcmp(argv[i], "--sdl1")) {
|
||||
setup.useSDL2 = false;
|
||||
} else if (!std::strcmp(argv[i], "--use-canonical-lib-names")) {
|
||||
setup.useCanonicalLibNames = true;
|
||||
// Deprecated: Kept here so it doesn't error
|
||||
} else if (!std::strcmp(argv[i], "--use-windows-unicode")) {
|
||||
setup.useWindowsUnicode = true;
|
||||
} else if (!std::strcmp(argv[i], "--use-windows-ansi")) {
|
||||
|
@ -737,9 +737,6 @@ void displayHelp(const char *exe) {
|
|||
" --tests Create project files for the tests\n"
|
||||
" (ignores --build-events and --installer, as well as engine settings)\n"
|
||||
" (default: false)\n"
|
||||
" --use-canonical-lib-names Use canonical library names for linking. This makes it easy to use\n"
|
||||
" e.g. vcpkg-provided libraries\n"
|
||||
" (default: false)\n"
|
||||
" --use-windows-unicode Use Windows Unicode APIs\n"
|
||||
" (default: true)\n"
|
||||
" --use-windows-ansi Use Windows ANSI APIs\n"
|
||||
|
|
|
@ -245,7 +245,6 @@ struct BuildSetup {
|
|||
bool runBuildEvents; ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder
|
||||
bool createInstaller; ///< Create installer after the build
|
||||
bool useSDL2; ///< Whether to use SDL2 or not.
|
||||
bool useCanonicalLibNames; ///< Whether to use canonical libraries names or default ones
|
||||
bool useStaticDetection; ///< Whether to link detection features inside the executable or not.
|
||||
bool useWindowsUnicode; ///< Whether to use Windows Unicode APIs or ANSI APIs.
|
||||
bool useXCFramework; ///< Whether to use Apple XCFrameworks instead of static libraries
|
||||
|
@ -257,7 +256,6 @@ struct BuildSetup {
|
|||
runBuildEvents = false;
|
||||
createInstaller = false;
|
||||
useSDL2 = true;
|
||||
useCanonicalLibNames = false;
|
||||
useStaticDetection = true;
|
||||
useWindowsUnicode = true;
|
||||
useXCFramework = false;
|
||||
|
|
|
@ -43,46 +43,44 @@ MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, St
|
|||
_arch_disabled_features[ARCH_AMD64] = amd64_disabled_features;
|
||||
// NASM not supported for WoA target
|
||||
// No OpenGL on Windows on ARM
|
||||
// https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
|
||||
StringList arm64_disabled_features;
|
||||
arm64_disabled_features.push_back("nasm");
|
||||
arm64_disabled_features.push_back("opengl");
|
||||
arm64_disabled_features.push_back("fribidi");
|
||||
_arch_disabled_features[ARCH_ARM64] = arm64_disabled_features;
|
||||
}
|
||||
|
||||
std::string MSVCProvider::getLibraryFromFeature(const char *feature, const BuildSetup &setup, bool isRelease) const {
|
||||
static const MSVCLibrary s_libraries[] = {
|
||||
// Libraries
|
||||
{ "sdl", "SDL.lib", "SDLd.lib", "winmm.lib imm32.lib version.lib setupapi.lib", nullptr },
|
||||
{ "sdl2", "SDL2.lib", "SDL2d.lib", "winmm.lib imm32.lib version.lib setupapi.lib", nullptr },
|
||||
{ "zlib", "zlib.lib", "zlibd.lib", nullptr, nullptr },
|
||||
{ "mad", "mad.lib", nullptr, nullptr, "libmad.lib" },
|
||||
{ "fribidi", "fribidi.lib", nullptr, nullptr, nullptr },
|
||||
{ "ogg", "ogg.lib", nullptr, nullptr, "libogg_static.lib" },
|
||||
{ "vorbis", "vorbis.lib vorbisfile.lib", nullptr, nullptr, "libvorbisfile_static.lib libvorbis_static.lib" },
|
||||
{ "flac", "FLAC.lib", nullptr, nullptr, "libFLAC_static.lib win_utf8_io_static.lib" },
|
||||
{ "png", "libpng16.lib", "libpng16d.lib", nullptr, nullptr },
|
||||
{ "gif", "gif.lib", nullptr, nullptr, nullptr },
|
||||
{ "faad", "faad.lib", nullptr, nullptr, "libfaad.lib" },
|
||||
{ "mikmod", "mikmod.lib", nullptr, nullptr, nullptr },
|
||||
{ "mpeg2", "mpeg2.lib", nullptr, nullptr, "libmpeg2.lib" },
|
||||
{ "theoradec", "theora.lib", nullptr, nullptr, "libtheora_static.lib" },
|
||||
{ "vpx", "vpx.lib", nullptr, nullptr, nullptr },
|
||||
{ "freetype2", "freetype.lib", "freetyped.lib", nullptr, nullptr },
|
||||
{ "jpeg", "jpeg.lib", nullptr, nullptr, "jpeg-static.lib" },
|
||||
{"fluidsynth", "fluidsynth.lib", nullptr, nullptr, "libfluidsynth.lib" },
|
||||
{ "fluidlite", "fluidlite.lib", nullptr, nullptr, nullptr },
|
||||
{ "libcurl", "libcurl.lib", "libcurl-d.lib", "ws2_32.lib wldap32.lib crypt32.lib normaliz.lib", nullptr },
|
||||
{ "sdlnet", "SDL_net.lib", nullptr, "iphlpapi.lib", nullptr },
|
||||
{ "sdl2net", "SDL2_net.lib", nullptr, "iphlpapi.lib", "SDL_net.lib" },
|
||||
{ "discord", "discord-rpc.lib", nullptr, nullptr, nullptr },
|
||||
{ "retrowave", "retrowave.lib", nullptr, nullptr, nullptr },
|
||||
{ "sdl", "SDL.lib", "SDLd.lib", "winmm.lib imm32.lib version.lib setupapi.lib" },
|
||||
{ "sdl2", "SDL2.lib", "SDL2d.lib", "winmm.lib imm32.lib version.lib setupapi.lib" },
|
||||
{ "zlib", "zlib.lib", "zlibd.lib", nullptr },
|
||||
{ "mad", "mad.lib", nullptr, nullptr },
|
||||
{ "fribidi", "fribidi.lib", nullptr, nullptr },
|
||||
{ "ogg", "ogg.lib", nullptr, nullptr },
|
||||
{ "vorbis", "vorbis.lib vorbisfile.lib", nullptr, nullptr },
|
||||
{ "flac", "FLAC.lib", nullptr, nullptr },
|
||||
{ "png", "libpng16.lib", "libpng16d.lib", nullptr },
|
||||
{ "gif", "gif.lib", nullptr, nullptr },
|
||||
{ "faad", "faad.lib", nullptr, nullptr },
|
||||
{ "mikmod", "mikmod.lib", nullptr, nullptr },
|
||||
{ "mpeg2", "mpeg2.lib", nullptr, nullptr },
|
||||
{ "theoradec", "theora.lib", nullptr, nullptr },
|
||||
{ "vpx", "vpx.lib", nullptr, nullptr },
|
||||
{ "freetype2", "freetype.lib", "freetyped.lib", nullptr },
|
||||
{ "jpeg", "jpeg.lib", nullptr, nullptr },
|
||||
{"fluidsynth", "fluidsynth.lib", nullptr, nullptr },
|
||||
{ "fluidlite", "fluidlite.lib", nullptr, nullptr },
|
||||
{ "libcurl", "libcurl.lib", "libcurl-d.lib", "ws2_32.lib wldap32.lib crypt32.lib normaliz.lib" },
|
||||
{ "sdlnet", "SDL_net.lib", nullptr, "iphlpapi.lib" },
|
||||
{ "sdl2net", "SDL2_net.lib", nullptr, "iphlpapi.lib" },
|
||||
{ "discord", "discord-rpc.lib", nullptr, nullptr },
|
||||
{ "retrowave", "retrowave.lib", nullptr, nullptr },
|
||||
// Feature flags with library dependencies
|
||||
{ "updates", "winsparkle.lib", nullptr, nullptr, nullptr },
|
||||
{ "tts", nullptr, nullptr, "sapi.lib", nullptr },
|
||||
{ "opengl", nullptr, nullptr, "opengl32.lib", nullptr },
|
||||
{ "enet", nullptr, nullptr, "winmm.lib ws2_32.lib", nullptr }
|
||||
{ "updates", "winsparkle.lib", nullptr, nullptr },
|
||||
{ "tts", nullptr, nullptr, "sapi.lib" },
|
||||
{ "opengl", nullptr, nullptr, "opengl32.lib" },
|
||||
{ "enet", nullptr, nullptr, "winmm.lib ws2_32.lib" }
|
||||
};
|
||||
|
||||
// HACK for switching SDL_net to SDL2_net
|
||||
|
@ -107,21 +105,17 @@ std::string MSVCProvider::getLibraryFromFeature(const char *feature, const Build
|
|||
libs += " ";
|
||||
}
|
||||
|
||||
const char *basename = library->release;
|
||||
if (setup.useCanonicalLibNames) {
|
||||
// Vcpkg already adds the libs
|
||||
if (!setup.useVcpkg) {
|
||||
const char *basename = library->release;
|
||||
// Debug name takes priority
|
||||
if (!isRelease && library->debug) {
|
||||
basename = library->debug;
|
||||
}
|
||||
} else {
|
||||
// Legacy name ignores configuration
|
||||
if (library->legacy) {
|
||||
basename = library->legacy;
|
||||
if (basename) {
|
||||
libs += basename;
|
||||
}
|
||||
}
|
||||
if (basename) {
|
||||
libs += basename;
|
||||
}
|
||||
}
|
||||
|
||||
return libs;
|
||||
|
|
|
@ -47,7 +47,6 @@ protected:
|
|||
const char *release; ///< Filename of the Release build of the library.
|
||||
const char *debug; ///< Filename of the Debug build of the library.
|
||||
const char *depends; ///< Win32 libs this library must be linked against.
|
||||
const char *legacy; ///< Legacy name for old precompiled libraries (deprecated).
|
||||
};
|
||||
|
||||
std::string getLibraryFromFeature(const char *feature, const BuildSetup &setup, bool isRelease) const;
|
||||
|
|
|
@ -55,28 +55,28 @@ goto done
|
|||
echo.
|
||||
echo Creating project files with all engines enabled (stable and unstable)
|
||||
echo.
|
||||
create_project ..\.. --enable-all-engines --use-canonical-lib-names --msvc
|
||||
create_project ..\.. --enable-all-engines --msvc
|
||||
goto done
|
||||
|
||||
:stable
|
||||
echo.
|
||||
echo Creating normal project files, with only the stable engines enabled
|
||||
echo.
|
||||
create_project ..\.. --use-canonical-lib-names --msvc
|
||||
create_project ..\.. --msvc
|
||||
goto done
|
||||
|
||||
:tools
|
||||
echo.
|
||||
echo Creating tools project files
|
||||
echo.
|
||||
create_project ..\.. --tools --use-canonical-lib-names --msvc
|
||||
create_project ..\.. --tools --msvc
|
||||
goto done
|
||||
|
||||
:tests
|
||||
echo.
|
||||
echo Creating tests project files
|
||||
echo.
|
||||
create_project ..\.. --tests --use-canonical-lib-names --msvc
|
||||
create_project ..\.. --tests --msvc
|
||||
goto done
|
||||
|
||||
:clean_check
|
||||
|
|
2
ports.mk
2
ports.mk
|
@ -647,7 +647,7 @@ endif
|
|||
@echo Creating Code::Blocks project files...
|
||||
@cd $(srcdir)/dists/codeblocks && $(PWD)/devtools/create_project/create_project ../.. --codeblocks >/dev/null && git add -f engines/*.h *.workspace *.cbp
|
||||
@echo Creating MSVC project files...
|
||||
@cd $(srcdir)/dists/msvc && $(PWD)/devtools/create_project/create_project ../.. --use-canonical-lib-names --msvc-version 12 --msvc >/dev/null && git add -f engines/*.h *.sln *.vcxproj *.vcxproj.filters *.props
|
||||
@cd $(srcdir)/dists/msvc && $(PWD)/devtools/create_project/create_project ../.. --msvc-version 12 --msvc >/dev/null && git add -f engines/*.h *.sln *.vcxproj *.vcxproj.filters *.props
|
||||
@echo
|
||||
@echo All is done.
|
||||
@echo Now run
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue