Skip to content
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

[sail] Add new port #14925

Merged
merged 21 commits into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions ports/sail/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux")
HappySeaFox marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO smoked-herring/sail
REF v0.9.0-pre10
SHA512 d38a3c7d33495c84d7ada91a4131d32ce61f3fdf32a7e0631b28e7d8492fa4cb672eea09ef8cf0272dabd57f640b090749e3ecd863be577af2b98763873dc57d
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSAIL_VCPKG_PORT=ON
-DSAIL_BUILD_EXAMPLES=OFF
-DSAIL_BUILD_TESTS=OFF
)

vcpkg_install_cmake()

vcpkg_copy_pdbs()

# Remove duplicate files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share)

# Move codecs
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sail ${CURRENT_PACKAGES_DIR}/bin/sail)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sail ${CURRENT_PACKAGES_DIR}/debug/bin/sail)

# Move cmake configs
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sail)

# Fix pkg-config files
vcpkg_fixup_pkgconfig()

# Handle usage
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
14 changes: 14 additions & 0 deletions ports/sail/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
The package sail provides CMake targets:

C libraries:

find_package(Sail CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail)

C++ bindings:

find_package(Sail CONFIG REQUIRED)
target_link_libraries(main PRIVATE SAIL::sail-c++)

For dynamic builds, please also copy SAIL codecs (bin/sail) and their dependencies
into the application directory.
13 changes: 13 additions & 0 deletions ports/sail/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "sail",
"version-string": "0.9.0-pre10",
"description": "The missing small and fast image decoding library for humans (not for machines)",
"homepage": "https://github.com/smoked-herring/sail",
"supports": "windows & !static & !uwp",
"dependencies": [
"giflib",
"libjpeg-turbo",
"libpng",
"tiff"
]
}
NancyLi1013 marked this conversation as resolved.
Show resolved Hide resolved