From 3056fed522595f00a95b6fd8ea7427da91e5edda Mon Sep 17 00:00:00 2001 From: endingly Date: Thu, 15 Jun 2023 03:35:23 +0800 Subject: [PATCH] [games101-cgl] new port (#31831) * [games101-cgl] new port * [games101-cgl] update version file * [games101-cgl] update version dataset * Updated the logic for installing the source code repository * Updated the logic for installing the source code repository * Update ports/games101-cgl/portfile.cmake Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * modify installation behavior * add git-tree id * Update version database * add usage * modify download hash * update version data --------- Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> --- ports/games101-cgl/portfile.cmake | 21 +++++++++++++++++++++ ports/games101-cgl/usage | 7 +++++++ ports/games101-cgl/vcpkg.json | 21 +++++++++++++++++++++ versions/baseline.json | 4 ++++ versions/g-/games101-cgl.json | 9 +++++++++ 5 files changed, 62 insertions(+) create mode 100644 ports/games101-cgl/portfile.cmake create mode 100644 ports/games101-cgl/usage create mode 100644 ports/games101-cgl/vcpkg.json create mode 100644 versions/g-/games101-cgl.json diff --git a/ports/games101-cgl/portfile.cmake b/ports/games101-cgl/portfile.cmake new file mode 100644 index 0000000000..708d56b627 --- /dev/null +++ b/ports/games101-cgl/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO endingly/games101-cgl + REF v${VERSION} + SHA512 609bc549a5bb20254fa8ae8a765b688352d017bf4f1fa278385b534da3c75eb81fc893dd1736db7efd0ab13c62de3597ccb678a3c2a6f31c0ee6549f6d5c9f3d + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") \ No newline at end of file diff --git a/ports/games101-cgl/usage b/ports/games101-cgl/usage new file mode 100644 index 0000000000..77f4156d82 --- /dev/null +++ b/ports/games101-cgl/usage @@ -0,0 +1,7 @@ +The package games101-cgl provides CMake targets: + + find_package(games101-cgl CONFIG REQUIRED) + target_link_libraries(main PRIVATE games101-cgl) + + And include header file like: + #include diff --git a/ports/games101-cgl/vcpkg.json b/ports/games101-cgl/vcpkg.json new file mode 100644 index 0000000000..d17b44b8f8 --- /dev/null +++ b/ports/games101-cgl/vcpkg.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "games101-cgl", + "version": "0.1.0", + "description": "The package is for Games101's homework8 subproject.", + "homepage": "https://github.com/endingly/games101-cgl", + "license": "MIT", + "dependencies": [ + "freetype", + "glew", + "glfw3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 3b1ece5cf6..9a24200351 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2708,6 +2708,10 @@ "baseline": "1.4.1", "port-version": 1 }, + "games101-cgl": { + "baseline": "0.1.0", + "port-version": 0 + }, "gamma": { "baseline": "gamma-2018-01-27", "port-version": 6 diff --git a/versions/g-/games101-cgl.json b/versions/g-/games101-cgl.json new file mode 100644 index 0000000000..ae210f8545 --- /dev/null +++ b/versions/g-/games101-cgl.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "976ee066a06bc29768e1fd575da2e7d622cf6465", + "version": "0.1.0", + "port-version": 0 + } + ] +}