]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | # DEPRECATED BY ports/vcpkg-cmake/vcpkg_cmake_install |
2 | #[===[.md: | |
3 | # vcpkg_install_cmake | |
4 | ||
5 | Build and install a cmake project. | |
6 | ||
7 | ## Usage: | |
8 | ```cmake | |
9 | vcpkg_install_cmake(...) | |
10 | ``` | |
11 | ||
12 | ## Parameters: | |
13 | See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). | |
14 | ||
15 | ## Notes: | |
16 | This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` | |
17 | parameter. | |
18 | ||
19 | ## Examples: | |
20 | ||
21 | * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) | |
22 | * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) | |
23 | * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) | |
24 | * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) | |
25 | #]===] | |
26 | ||
27 | function(vcpkg_install_cmake) | |
28 | if(Z_VCPKG_CMAKE_INSTALL_GUARD) | |
29 | 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.") | |
30 | endif() | |
31 | ||
32 | cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "") | |
33 | if(DEFINED arg_UNPARSED_ARGUMENTS) | |
34 | message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") | |
35 | endif() | |
36 | ||
37 | set(args) | |
38 | foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH) | |
39 | if(arg_${arg}) | |
40 | list(APPEND args "${arg}") | |
41 | endif() | |
42 | endforeach() | |
43 | ||
44 | vcpkg_build_cmake(Z_VCPKG_DISABLE_DEPRECATION MESSAGE | |
45 | ${args} | |
46 | LOGFILE_ROOT install | |
47 | TARGET install | |
48 | ) | |
49 | endfunction() |