aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/test_ports/vcpkg-ci-nanobind
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-nanobind')
-rw-r--r--vcpkg/scripts/test_ports/vcpkg-ci-nanobind/portfile.cmake20
-rw-r--r--vcpkg/scripts/test_ports/vcpkg-ci-nanobind/vcpkg.json14
2 files changed, 34 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/portfile.cmake
new file mode 100644
index 0000000..b6dc884
--- /dev/null
+++ b/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/portfile.cmake
@@ -0,0 +1,20 @@
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+# This test does not support cross-compilation due to nanobind's usage of the
+# Python interpreter to figure out Python module suffix.
+if(VCPKG_CROSSCOMPILING)
+ message(WARNING "Skipping vcpkg-ci-nanobind because it is not expected to work when cross-compiling")
+ return()
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO wjakob/nanobind_example
+ REF 4b5c9bd484dec77e085a188dcefc536aed69aae9
+ SHA512 ec7eeb25b5c5ee2e8bbcc48e78719dc6e5211cf54794dd3c370ad3e8d685fbc8b79435890da3b9481656169efaa87b77e3ea55ce864efd670dd9ea0600dee77d
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
+
+vcpkg_cmake_build()
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/vcpkg.json
new file mode 100644
index 0000000..5c5baf8
--- /dev/null
+++ b/vcpkg/scripts/test_ports/vcpkg-ci-nanobind/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "vcpkg-ci-nanobind",
+ "version-date": "2025-04-03",
+ "description": "A nanobind example project",
+ "homepage": "https://nanobind.readthedocs.io/en/latest/",
+ "license": "BSD-3-Clause",
+ "dependencies": [
+ "nanobind",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}