-
Notifications
You must be signed in to change notification settings - Fork 7.7k
[gif-load]: add new port #53206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[gif-load]: add new port #53206
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bf4b99e
Add gif-load port with initial configuration and test setup
luadebug ea19f15
Refactor success variable to be const
luadebug 44febf4
gif-load: use upstream license notice
BillyONeal 9b55efd
Merge pull request #3 from BillyONeal/pr-53206-gif-load
luadebug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO hidefromkgb/gif_load | ||
| REF 74b674de2704bc1b20fc3bf482a5ee3e774b67c5 | ||
| SHA512 f58b02ad62c0898865bb0c933711f52eb203c3e49b832847613a1de32330192636ddd31aacba2cefe7a7acde7c9be3c5edeea262b905b9a49bf05f4bbafddc21 | ||
| HEAD_REF master | ||
| ) | ||
|
|
||
| file(INSTALL "${SOURCE_PATH}/gif_load.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") | ||
|
|
||
| file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-gif-load-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-gif-load") | ||
|
|
||
| vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/gif_load.h") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| if(NOT TARGET unofficial::gif-load::gif-load) | ||
| add_library(unofficial::gif-load::gif-load INTERFACE IMPORTED) | ||
| set_target_properties(unofficial::gif-load::gif-load PROPERTIES | ||
| INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../../include") | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "gif-load", | ||
| "version-date": "2019-01-06", | ||
| "description": "A slim, fast and header-only GIF loader written in C", | ||
| "homepage": "https://github.com/hidefromkgb/gif_load", | ||
| "license": "Unlicense" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${CURRENT_PORT_DIR}/project" | ||
| ) | ||
| vcpkg_cmake_build() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| cmake_minimum_required(VERSION 3.22) | ||
| project(gif-load-test LANGUAGES C) | ||
| find_package(unofficial-gif-load CONFIG REQUIRED) | ||
| add_executable(main main.c) | ||
| target_link_libraries(main PRIVATE unofficial::gif-load::gif-load) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #include <gif_load.h> | ||
| #include <stdbool.h> | ||
|
|
||
| static const unsigned char gif_data[] = { 0x47 }; | ||
| static void frame_writer(void *anim, struct GIF_WHDR *whdr) | ||
| { | ||
| (void)anim; | ||
| (void)whdr; | ||
| } | ||
|
|
||
| int main(void) | ||
| { | ||
| const bool success = GIF_Load((void *)gif_data, (long)sizeof(gif_data), frame_writer, 0, 0, 0) == 1; | ||
| return 0; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "name": "vcpkg-ci-gif-load", | ||
| "version-string": "ci", | ||
| "description": "Validates gif-load", | ||
| "dependencies": [ | ||
| "gif-load", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "versions": [ | ||
| { | ||
| "git-tree": "935cba3a1773d4c9f46d5a676ad4170bfa4cc132", | ||
| "version-date": "2019-01-06", | ||
| "port-version": 0 | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this isn't actually running the result; it's a compile only test, so I'm not sure how plausible this needs to be.