mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Updated Building KeePassXC (markdown)
@@ -101,19 +101,20 @@ When building with ASAN support on macOS, you need to use `export ASAN_OPTIONS=d
|
|||||||
### Windows
|
### Windows
|
||||||
The preferred way to build on Windows is using MSVC, for which you have to open an _MSVC Tools Command Prompt_. If instead, you are using MSYS2, open a _MSYS2 MinGW_ terminal (*not* _MSYS2 MSYS_ which is the default).
|
The preferred way to build on Windows is using MSVC, for which you have to open an _MSVC Tools Command Prompt_. If instead, you are using MSYS2, open a _MSYS2 MinGW_ terminal (*not* _MSYS2 MSYS_ which is the default).
|
||||||
|
|
||||||
Download and unpack the source code as described in the [Linux](#linux) section. To build KeePassXC, change into the source code directory and run:
|
Download and unpack the source code as described in the [Linux](#linux) section. To build KeePassXC with MSVC, change into the source code directory and run:
|
||||||
```
|
```
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake \
|
cmake \
|
||||||
-DWITH_XC_ALL=ON \
|
-DWITH_XC_ALL=ON \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ..
|
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake \
|
||||||
|
-DVCPKG_TARGET_TRIPLET=x64-windows-release ..
|
||||||
make -j8 package
|
make -j8 package
|
||||||
```
|
```
|
||||||
If you build with MSVC, make sure that `-DCMAKE_TOOLCHAIN_FILE` points to the correct path of your vcpkg installation. If instead, you build with Msys2, omit it altogether.
|
Make sure that `-DCMAKE_TOOLCHAIN_FILE` points to the correct path of your vcpkg installation.
|
||||||
|
|
||||||
If you build with MSys2, add `-G "MSYS Makefiles"`.
|
If you build with Msys2, omit `-DCMAKE_TOOLCHAIN_FILE` and `-DVCPKG_TARGET_TRIPLET` altogether and add `-G "MSYS Makefiles"` instead.
|
||||||
|
|
||||||
|
|
||||||
## 3. Running tests
|
## 3. Running tests
|
||||||
|
|||||||
Reference in New Issue
Block a user