2019-10-05 22:51:07 +08:00
|
|
|
# vcpkg_build_nmake
|
|
|
|
|
2021-03-11 01:56:07 +08:00
|
|
|
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_nmake.md).
|
2021-03-01 05:17:19 +08:00
|
|
|
|
2019-10-05 22:51:07 +08:00
|
|
|
Build a msvc makefile project.
|
|
|
|
|
|
|
|
## Usage:
|
|
|
|
```cmake
|
|
|
|
vcpkg_build_nmake(
|
|
|
|
SOURCE_PATH <${SOURCE_PATH}>
|
|
|
|
[NO_DEBUG]
|
2021-09-15 05:26:31 +08:00
|
|
|
[ENABLE_INSTALL]
|
2020-11-21 02:29:25 +08:00
|
|
|
[TARGET <all>]
|
2019-12-23 22:10:12 +08:00
|
|
|
[PROJECT_SUBPATH <${SUBPATH}>]
|
|
|
|
[PROJECT_NAME <${MAKEFILE_NAME}>]
|
2019-10-30 14:23:36 +08:00
|
|
|
[PRERUN_SHELL <${SHELL_PATH}>]
|
|
|
|
[PRERUN_SHELL_DEBUG <${SHELL_PATH}>]
|
|
|
|
[PRERUN_SHELL_RELEASE <${SHELL_PATH}>]
|
2019-10-05 22:51:07 +08:00
|
|
|
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
|
|
|
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
|
|
|
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
|
|
|
[TARGET <target>])
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
### SOURCE_PATH
|
|
|
|
Specifies the directory containing the source files.
|
|
|
|
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
|
|
|
|
|
|
|
### PROJECT_SUBPATH
|
|
|
|
Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile.
|
|
|
|
|
|
|
|
### PROJECT_NAME
|
|
|
|
Specifies the name of msvc makefile name.
|
|
|
|
Default is `makefile.vc`
|
|
|
|
|
|
|
|
### NO_DEBUG
|
|
|
|
This port doesn't support debug mode.
|
|
|
|
|
|
|
|
### ENABLE_INSTALL
|
|
|
|
Install binaries after build.
|
|
|
|
|
2019-10-30 14:23:36 +08:00
|
|
|
### PRERUN_SHELL
|
|
|
|
Script that needs to be called before build
|
|
|
|
|
|
|
|
### PRERUN_SHELL_DEBUG
|
|
|
|
Script that needs to be called before debug build
|
|
|
|
|
|
|
|
### PRERUN_SHELL_RELEASE
|
|
|
|
Script that needs to be called before release build
|
|
|
|
|
2019-10-05 22:51:07 +08:00
|
|
|
### OPTIONS
|
|
|
|
Additional options passed to generate during the generation.
|
|
|
|
|
|
|
|
### OPTIONS_RELEASE
|
|
|
|
Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`.
|
|
|
|
|
|
|
|
### OPTIONS_DEBUG
|
|
|
|
Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`.
|
|
|
|
|
|
|
|
### TARGET
|
|
|
|
The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will
|
|
|
|
be passed.
|
|
|
|
|
|
|
|
### ADD_BIN_TO_PATH
|
|
|
|
Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs.
|
|
|
|
|
|
|
|
## Notes:
|
2021-01-06 04:37:19 +08:00
|
|
|
You can use the alias [`vcpkg_install_nmake()`](vcpkg_install_nmake.md) function if your makefile supports the
|
2019-10-05 22:51:07 +08:00
|
|
|
"install" target
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
|
|
|
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
|
|
|
|
|
|
|
|
## Source
|
2021-03-01 05:17:19 +08:00
|
|
|
[scripts/cmake/vcpkg\_build\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_nmake.cmake)
|