aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fixed-containers
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/ports/fixed-containers
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/fixed-containers')
-rw-r--r--vcpkg/ports/fixed-containers/add-install-configuration.patch35
-rw-r--r--vcpkg/ports/fixed-containers/fixed_containersConfig.cmake.in9
-rw-r--r--vcpkg/ports/fixed-containers/portfile.cmake27
-rw-r--r--vcpkg/ports/fixed-containers/vcpkg.json18
4 files changed, 89 insertions, 0 deletions
diff --git a/vcpkg/ports/fixed-containers/add-install-configuration.patch b/vcpkg/ports/fixed-containers/add-install-configuration.patch
new file mode 100644
index 0000000..9569bdf
--- /dev/null
+++ b/vcpkg/ports/fixed-containers/add-install-configuration.patch
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2738060..4f3aedd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -236,6 +236,13 @@ if (FIXED_CONTAINERS_OPT_INSTALL)
+ target_include_directories(fixed_containers INTERFACE $<INSTALL_INTERFACE:include>)
+
+ include(CMakePackageConfigHelpers)
++
++ configure_package_config_file(
++ ${PROJECT_NAME}Config.cmake.in
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}/
++ NO_CHECK_REQUIRED_COMPONENTS_MACRO)
++
+ write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake
+ VERSION "0.0.0"
+ COMPATIBILITY AnyNewerVersion
+@@ -249,11 +256,14 @@ if (FIXED_CONTAINERS_OPT_INSTALL)
+
+ install(EXPORT ${PROJECT_NAME}Config
+ NAMESPACE ${PROJECT_NAME}::
++ FILE ${PROJECT_NAME}-targets.cmake
+ DESTINATION lib/cmake/${PROJECT_NAME})
+
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include
+ DESTINATION .)
+
+- export(EXPORT ${PROJECT_NAME}Config
+- NAMESPACE ${PROJECT_NAME}::)
++ install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ DESTINATION lib/cmake/${PROJECT_NAME})
+ endif()
diff --git a/vcpkg/ports/fixed-containers/fixed_containersConfig.cmake.in b/vcpkg/ports/fixed-containers/fixed_containersConfig.cmake.in
new file mode 100644
index 0000000..a8e659e
--- /dev/null
+++ b/vcpkg/ports/fixed-containers/fixed_containersConfig.cmake.in
@@ -0,0 +1,9 @@
+
+@PACKAGE_INIT@
+
+include(CMakeFindDependencyMacro)
+
+find_dependency(magic_enum CONFIG)
+
+include("${CMAKE_CURRENT_LIST_DIR}/fixed_containers-targets.cmake")
+
diff --git a/vcpkg/ports/fixed-containers/portfile.cmake b/vcpkg/ports/fixed-containers/portfile.cmake
new file mode 100644
index 0000000..1106d1f
--- /dev/null
+++ b/vcpkg/ports/fixed-containers/portfile.cmake
@@ -0,0 +1,27 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO teslamotors/fixed-containers
+ REF 1ad10a6ca835611124f54a1d8ed04bcf7ab53da4
+ SHA512 71b7ea86ed45bac39c2f22c572f84d3a9862aab350eeef5d72c6061d42c10bf7fad26cafc6c6b991cdf3ac758b23c29fd8d3414f1b2af7c65058bc31d000b49b
+ HEAD_REF main
+ PATCHES add-install-configuration.patch
+)
+
+set(VCPKG_BUILD_TYPE release) # header-only
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/fixed_containersConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ -DFIXED_CONTAINERS_OPT_INSTALL=ON
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME fixed_containers CONFIG_PATH lib/cmake/fixed_containers)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/fixed-containers/vcpkg.json b/vcpkg/ports/fixed-containers/vcpkg.json
new file mode 100644
index 0000000..6d93718
--- /dev/null
+++ b/vcpkg/ports/fixed-containers/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "fixed-containers",
+ "version-date": "2024-09-19",
+ "description": "C++ Fixed Containers",
+ "homepage": "https://github.com/teslamotors/fixed-containers",
+ "license": "MIT",
+ "dependencies": [
+ "magic-enum",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}