Skip to content

Commit

Permalink
README: Fix build command for MSVC (#131)
Browse files Browse the repository at this point in the history
CMake's configure command generates all profiles for MSVC, and you need to choose the correct profile at build time.
  • Loading branch information
btzy authored Feb 24, 2024
1 parent 84d5429 commit 17b6e8c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,26 @@ Add `-DNFD_BUILD_TESTS=ON` to build sample programs and `-DNFD_INSTALL=ON` to en
## Standalone Library
If you want to build the standalone static library,
execute the following commands (starting from the project root directory):
For GCC and Clang:
```
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
```
For MSVC:
```
mkdir build
cd build
cmake ..
cmake --build . --config Release
```
The above commands will make a `build` directory,
and build the project (in release mode) there.
If you are developing NFDe, you may want to do `-DCMAKE_BUILD_TYPE=Debug`
If you are developing NFDe, you may want to do `-DCMAKE_BUILD_TYPE=Debug`/`--config Debug`
to build a debug version of the library instead.
When building as a standalone library, sample programs are built and the install target is enabled by default.
Expand Down

0 comments on commit 17b6e8c

Please sign in to comment.