2021-05-10 01:47:21 +08:00
|
|
|
# DEPRECATED BY ports/vcpkg-cmake/vcpkg_cmake_install
|
2020-12-02 05:37:26 +08:00
|
|
|
#[===[.md:
|
|
|
|
# vcpkg_install_cmake
|
|
|
|
|
|
|
|
Build and install a cmake project.
|
|
|
|
|
|
|
|
## Usage:
|
|
|
|
```cmake
|
|
|
|
vcpkg_install_cmake(...)
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters:
|
|
|
|
See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md).
|
|
|
|
|
|
|
|
## Notes:
|
|
|
|
This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install`
|
|
|
|
parameter.
|
|
|
|
|
|
|
|
## 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)
|
|
|
|
#]===]
|
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
function(vcpkg_install_cmake)
|
2021-03-01 05:17:19 +08:00
|
|
|
if(Z_VCPKG_CMAKE_INSTALL_GUARD)
|
|
|
|
message(FATAL_ERROR "The ${PORT} port already depends on vcpkg-cmake; using both vcpkg-cmake and vcpkg_install_cmake in the same port is unsupported.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "")
|
|
|
|
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
|
|
|
message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
|
|
|
endif()
|
|
|
|
|
2021-11-06 07:55:14 +08:00
|
|
|
vcpkg_list(SET params)
|
2021-03-01 05:17:19 +08:00
|
|
|
foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH)
|
|
|
|
if(arg_${arg})
|
2021-11-06 07:55:14 +08:00
|
|
|
vcpkg_list(APPEND params "${arg}")
|
2021-03-01 05:17:19 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
vcpkg_build_cmake(Z_VCPKG_DISABLE_DEPRECATION MESSAGE
|
2021-11-06 07:55:14 +08:00
|
|
|
${params}
|
2021-03-01 05:17:19 +08:00
|
|
|
LOGFILE_ROOT install
|
|
|
|
TARGET install
|
|
|
|
)
|
2016-09-19 11:50:08 +08:00
|
|
|
endfunction()
|