2019-10-05 22:51:07 +08:00
|
|
|
# vcpkg_install_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_install_nmake.md).
|
2021-03-01 05:17:19 +08:00
|
|
|
|
2019-10-05 22:51:07 +08:00
|
|
|
Build and install a msvc makefile project.
|
|
|
|
|
|
|
|
## Usage:
|
|
|
|
```cmake
|
|
|
|
vcpkg_install_nmake(
|
|
|
|
SOURCE_PATH <${SOURCE_PATH}>
|
2022-11-03 02:32:43 +08:00
|
|
|
[PROJECT_SUBPATH <${SUBPATH}>]
|
|
|
|
[PROJECT_NAME <${MAKEFILE_NAME}>]
|
|
|
|
[CL_LANGUAGE <language-name>]
|
|
|
|
[PREFER_JOM]
|
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>...]
|
2022-11-03 02:32:43 +08:00
|
|
|
[TARGET <all>...]
|
|
|
|
)
|
2019-10-05 22:51:07 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## 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
|
2022-11-03 02:32:43 +08:00
|
|
|
Specifies the sub directory containing the makefile.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
|
|
|
### PROJECT_NAME
|
2022-11-03 02:32:43 +08:00
|
|
|
Specifies the name of the makefile.
|
|
|
|
Default is `makefile.vc`
|
2019-10-05 22:51:07 +08:00
|
|
|
|
2022-11-03 02:32:43 +08:00
|
|
|
### CL_LANGUAGE
|
|
|
|
Specifies the language for setting up flags in the `_CL_` environment variable.
|
|
|
|
The default language is `CXX`.
|
|
|
|
To disable the modification of `_CL_`, use `NONE`.
|
|
|
|
|
|
|
|
### PREFER_JOM
|
|
|
|
Specifies that a parallel build with `jom` should be attempted.
|
|
|
|
This is useful for faster builds of makefiles which process many independent targets
|
|
|
|
and which cannot benefit from the `/MP` cl option.
|
|
|
|
To mitigate issues with concurrency-unaware makefiles, a normal `nmake` build is run after `jom` errors.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
2019-10-30 14:23:36 +08:00
|
|
|
### PRERUN_SHELL
|
2022-11-03 02:32:43 +08:00
|
|
|
Script that needs to be called before build.
|
2019-10-30 14:23:36 +08:00
|
|
|
|
|
|
|
### PRERUN_SHELL_DEBUG
|
2022-11-03 02:32:43 +08:00
|
|
|
Script that needs to be called before debug build.
|
2019-10-30 14:23:36 +08:00
|
|
|
|
|
|
|
### PRERUN_SHELL_RELEASE
|
2022-11-03 02:32:43 +08:00
|
|
|
Script that needs to be called before release build.
|
2019-10-30 14:23:36 +08:00
|
|
|
|
2019-10-05 22:51:07 +08:00
|
|
|
### OPTIONS
|
2022-11-03 02:32:43 +08:00
|
|
|
Additional options passed to the build command.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
|
|
|
### OPTIONS_RELEASE
|
2022-11-03 02:32:43 +08:00
|
|
|
Additional options passed to the build command for the release build. These are in addition to `OPTIONS`.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
|
|
|
### OPTIONS_DEBUG
|
2022-11-03 02:32:43 +08:00
|
|
|
Additional options passed to the build command for the debug build. These are in addition to `OPTIONS`.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
2022-11-03 02:32:43 +08:00
|
|
|
### TARGET
|
|
|
|
The list of targets passed to the build command.
|
|
|
|
If not specified, target `all` will be passed.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
|
|
|
## Notes:
|
2022-11-03 02:32:43 +08:00
|
|
|
This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL`.
|
2019-10-05 22:51:07 +08:00
|
|
|
|
2019-12-23 22:10:12 +08:00
|
|
|
## Examples
|
|
|
|
|
2022-11-03 02:32:43 +08:00
|
|
|
* [libspatialite](https://github.com/microsoft/vcpkg/blob/master/ports/libspatialite/portfile.cmake)
|
|
|
|
* [tcl](https://github.com/microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
|
2019-12-23 22:10:12 +08:00
|
|
|
|
2019-10-05 22:51:07 +08:00
|
|
|
## Source
|
2021-03-01 05:17:19 +08:00
|
|
|
[scripts/cmake/vcpkg\_install\_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake)
|