diff --git a/ports/matchit/portfile.cmake b/ports/matchit/portfile.cmake new file mode 100644 index 0000000000..531a7dd592 --- /dev/null +++ b/ports/matchit/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BowenFu/matchit.cpp + REF v1.0.1 + SHA512 60edc6a392f5629391fa9e3ff09b7b98a0a782919a066ad2999eabb58e60f38bd50e080037b1276c5bca986f81ca0dfff2914816d46458b7b4e1c947a6134169 + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/matchit") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/matchit/usage b/ports/matchit/usage new file mode 100644 index 0000000000..a7697e0af0 --- /dev/null +++ b/ports/matchit/usage @@ -0,0 +1,4 @@ +The package matchit provides CMake targets: + + find_package(matchit CONFIG REQUIRED) + target_link_libraries(main PRIVATE matchit::matchit) diff --git a/ports/matchit/vcpkg.json b/ports/matchit/vcpkg.json new file mode 100644 index 0000000000..3228734cbc --- /dev/null +++ b/ports/matchit/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "matchit", + "version": "1.0.1", + "description": "matchit is a pattern matching library for C++17 with macro-free APIs", + "homepage": "https://github.com/BowenFu/matchit.cpp", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 25f8e88a44..2a355baa4e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4520,6 +4520,10 @@ "baseline": "2022-03-02", "port-version": 0 }, + "matchit": { + "baseline": "1.0.1", + "port-version": 0 + }, "materialx": { "baseline": "1.38.4", "port-version": 0 diff --git a/versions/m-/matchit.json b/versions/m-/matchit.json new file mode 100644 index 0000000000..1bcabadf65 --- /dev/null +++ b/versions/m-/matchit.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "1076ccb795a41c9ac08c17b06a295043695ed6ab", + "version": "1.0.1", + "port-version": 0 + } + ] +}