Skip to content

Commit 17b6e8c

Browse files
authored
README: Fix build command for MSVC (#131)
CMake's configure command generates all profiles for MSVC, and you need to choose the correct profile at build time.
1 parent 84d5429 commit 17b6e8c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,26 @@ Add `-DNFD_BUILD_TESTS=ON` to build sample programs and `-DNFD_INSTALL=ON` to en
110110
## Standalone Library
111111
If you want to build the standalone static library,
112112
execute the following commands (starting from the project root directory):
113+
114+
For GCC and Clang:
113115
```
114116
mkdir build
115117
cd build
116118
cmake -DCMAKE_BUILD_TYPE=Release ..
117119
cmake --build .
118120
```
119121
122+
For MSVC:
123+
```
124+
mkdir build
125+
cd build
126+
cmake ..
127+
cmake --build . --config Release
128+
```
129+
120130
The above commands will make a `build` directory,
121131
and build the project (in release mode) there.
122-
If you are developing NFDe, you may want to do `-DCMAKE_BUILD_TYPE=Debug`
132+
If you are developing NFDe, you may want to do `-DCMAKE_BUILD_TYPE=Debug`/`--config Debug`
123133
to build a debug version of the library instead.
124134
125135
When building as a standalone library, sample programs are built and the install target is enabled by default.

0 commit comments

Comments
 (0)