aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/cmake/vcpkg_install_cmake.cmake
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/scripts/cmake/vcpkg_install_cmake.cmake')
-rw-r--r--vcpkg/scripts/cmake/vcpkg_install_cmake.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake b/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake
new file mode 100644
index 0000000..df7d7bf
--- /dev/null
+++ b/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake
@@ -0,0 +1,23 @@
+function(vcpkg_install_cmake)
+ 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()
+
+ vcpkg_list(SET params)
+ foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH)
+ if(arg_${arg})
+ vcpkg_list(APPEND params "${arg}")
+ endif()
+ endforeach()
+
+ vcpkg_build_cmake(Z_VCPKG_DISABLE_DEPRECATION MESSAGE
+ ${params}
+ LOGFILE_ROOT install
+ TARGET install
+ )
+endfunction()