diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/hfsm2 | |
Diffstat (limited to 'vcpkg/ports/hfsm2')
| -rw-r--r-- | vcpkg/ports/hfsm2/portfile.cmake | 29 | ||||
| -rw-r--r-- | vcpkg/ports/hfsm2/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/hfsm2/vcpkg.json | 17 |
3 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/hfsm2/portfile.cmake b/vcpkg/ports/hfsm2/portfile.cmake new file mode 100644 index 0000000..caf14d0 --- /dev/null +++ b/vcpkg/ports/hfsm2/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrew-gresyk/HFSM2 + REF ${VERSION} + SHA512 9e68404cd509f598b693521c2f12a0672053b62c848c1a20ba7a6f39116ee6abd25b94a58d2b4d62ab2c02b987218f441038d9c762cda73e7c0f215b95f92b4f + HEAD_REF master +) + +set(VCPKG_BUILD_TYPE release) # header-only port + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DHFSM2_BUILD_TESTS=OFF + -DHFSM2_BUILD_EXAMPLES=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/hfsm2 PACKAGE_NAME hfsm2) +vcpkg_fixup_pkgconfig() + +# Remove empty directories if they exist +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/hfsm2/usage b/vcpkg/ports/hfsm2/usage new file mode 100644 index 0000000..66529aa --- /dev/null +++ b/vcpkg/ports/hfsm2/usage @@ -0,0 +1,4 @@ +The package hfsm2 is header only and can be used from CMake via: + + find_package(hfsm2 CONFIG REQUIRED) + target_link_libraries(main PRIVATE hfsm2::hfsm2)
\ No newline at end of file diff --git a/vcpkg/ports/hfsm2/vcpkg.json b/vcpkg/ports/hfsm2/vcpkg.json new file mode 100644 index 0000000..1d303d1 --- /dev/null +++ b/vcpkg/ports/hfsm2/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "hfsm2", + "version": "2.9.0", + "description": "Header-only heriarchical FSM framework in C++11, with fully statically-defined structure (no dynamic allocations), built with variadic templates.", + "homepage": "https://github.com/andrew-gresyk/HFSM2", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |