ULRE/BUILD.md

1.7 KiB
Raw Permalink Blame History

Build on Windows

Tested with Visual Studio 2019/2022 and Windows 11

please first install Git and CMake

and then clone vcpkg package manager by git:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat

Install vcpkg package manager to build required libraries:

vcpkg install glm:x64-windows jsoncpp:x64-windows expat:x64-windows
vcpkg integrate install

finish step you can use "cmake" create project file with vcpkg toolchain:

cmake . -DCMAKE_TOOLCHAIN_FILE=\????\vcpkg\scripts\buildsystems\vcpkg.cmake

or use "cmake-gui" with "Specify toolchain file for cross-compiling."

在Windows下编译工程

以下在Windows 11以及Visual Studio 2019/2022下测试通过

首先请安装GitCMake

然后使用git安装vcpkg package manager

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat

接着使用vcpkg package manager来安装我们所需要的第三方依赖库:

vcpkg install glm:x64-windows jsoncpp:x64-windows expat:x64-windows
vcpkg integrate install

最后你就可以使用CMake创建工程文件了:

cmake . -DCMAKE_TOOLCHAIN_FILE=\????\vcpkg\scripts\buildsystems\vcpkg.cmake

或是使用cmake-gui以图形界面形式创建但请在第一个界面选择“Specify toolchain file for cross-compiling”并指定使用vcpkg.cmake做为工具链。