summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-06-03 17:04:09 +0800
committerErik Kundiman <erik@megapahit.org>2025-06-03 17:04:09 +0800
commit36842acf763d664002cd89b8a76679ab8bbcda24 (patch)
tree7f20152a26f4a253568e17532b49e9369d3a03c9 /README.md
parent9ac2e961e3649ca03e333103d851005f2003ddbb (diff)
Instruction for disabling VS fatal warnings
otherwise we'd have to deal with every warning. Instruction for building from the command line too. Add MSBuild binary directory to PATH, and MSBuild needs its .exe extension typed too for it to be found, unlike other commands such as cmake, vcpkg, pkg-config, and so on. By default, MSBuild builds using the RelWithDebInfo configuration, hence the -p:Configuration parameter to have Release instead. I guess that's why CMake would consider CMAKE_BUILD_TYPE as not being used by the project.
Diffstat (limited to 'README.md')
-rw-r--r--README.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index b6dfa754c1..c1eea48788 100644
--- a/README.md
+++ b/README.md
@@ -123,10 +123,11 @@ $ megapahit
```
$ vcpkg install pkgconf python3 freealut apr-util boost freetype glm hunspell libjpeg-turbo meshoptimizer minizip nghttp2 openjpeg libvorbis libxml2[tools] xxhash
$ export LL_BUILD="/MD /O2 /Ob2 /std:c++20 /Zc:wchar_t- /Zi /GR /DLL_RELEASE=1 /DLL_RELEASE_FOR_DOWNLOAD=1 /DNDEBUG /D_SECURE_STL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0602 /D_WIN32_WINNT=0x0602"
-$ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH"
+$ export PATH="/c/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin:$VCPKG_ROOT/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin:$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/libxml2:$PATH"
$ export PKG_CONFIG_LIBDIR="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/lib/pkgconfig"
$ export PYTHON="$VCPKG_ROOT/installed/`uname -m|sed 's/86_//'`-windows/tools/python3/python.exe"
-$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF ../indra
+$ cmake -DADDRESS_SIZE:STRING=64 -DUSE_OPENAL:BOOL=ON -DUSE_FMODSTUDIO:BOOL=OFF -DENABLE_MEDIA_PLUGINS:BOOL=OFF -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=OFF -DROOT_PROJECT_NAME:STRING=Megapahit -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=OFF -DPACKAGE:BOOL=OFF -DVS_DISABLE_FATAL_WARNINGS:BOOL=ON ../indra
+$ MSBuild.exe Megapahit.sln -p:Configuration=Release
```
## Contribute