mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-14 02:09:19 +08:00
fdfe770571
* [vcpkg_*_nmake] Add option INSTALL_COMMAND
* [gdal] Update to 3.1.3 and switch to vcpkg_*_nmake on Windows
* [vcpkg_build_make] Add option MAKEFILE
* fix install on windows, fix linux build
* fix options position
* [gdal] Fix linux build
* [gdal] Fix expat library name
* [gdal] Fix geos library name
* [gdal] Fix cmake wrapper
* [pdal] Fix dependency geos
* [pdal] Fix PDALConfig.cmake
* [gdal] Fix dependency cfitsio on *inx
* disable cfitsio temporary
* [gdal] Correct cmake wrapper and usage
* [gdal] Fix tools on windows-static
* Revert a9ac823007
* Apply suggestions
* [vcpkg_build_nmake] Fix install command
* [vcpkg_build_nmake] Fix install command
* regenerate docs
* [gdal] Update dependency iconv and charset library names
* [gdal] add json-c as a dependency on non-windows
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
69 lines
2.4 KiB
Markdown
69 lines
2.4 KiB
Markdown
# vcpkg_configure_cmake
|
|
|
|
Configure CMake for Debug and Release builds of a project.
|
|
|
|
## Usage
|
|
```cmake
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH <${SOURCE_PATH}>
|
|
[PREFER_NINJA]
|
|
[DISABLE_PARALLEL_CONFIGURE]
|
|
[NO_CHARSET_FLAG]
|
|
[GENERATOR <"NMake Makefiles">]
|
|
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
|
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
|
|
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
|
|
)
|
|
```
|
|
|
|
## Parameters
|
|
### SOURCE_PATH
|
|
Specifies the directory containing the `CMakeLists.txt`.
|
|
By convention, this is usually set in the portfile as the variable `SOURCE_PATH`.
|
|
|
|
### PREFER_NINJA
|
|
Indicates that, when available, Vcpkg should use Ninja to perform the build.
|
|
This should be specified unless the port is known to not work under Ninja.
|
|
|
|
### DISABLE_PARALLEL_CONFIGURE
|
|
Disables running the CMake configure step in parallel.
|
|
This is needed for libraries which write back into their source directory during configure.
|
|
|
|
This also disables CMAKE_DISABLE_SOURCE_CHANGES.
|
|
|
|
### NO_CHARSET_FLAG
|
|
Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`.
|
|
|
|
This is needed for libraries that set their own source code's character set.
|
|
|
|
### GENERATOR
|
|
Specifies the precise generator to use.
|
|
|
|
This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build.
|
|
If used for this purpose, it should be set to `"NMake Makefiles"`.
|
|
|
|
### OPTIONS
|
|
Additional options passed to CMake during the configuration.
|
|
|
|
### OPTIONS_RELEASE
|
|
Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`.
|
|
|
|
### OPTIONS_DEBUG
|
|
Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`.
|
|
|
|
### LOGNAME
|
|
Name of the log to write the output of the configure call to.
|
|
|
|
## Notes
|
|
This command supplies many common arguments to CMake. To see the full list, examine the source.
|
|
|
|
## Examples
|
|
|
|
* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
|
|
* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
|
|
* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
|
|
* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
|
|
|
|
## Source
|
|
[scripts/cmake/vcpkg_configure_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake)
|