forked from e-n-f/tile-stitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
219 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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,72 @@ | ||
# Copyright (c) 2021-2022-2023 Luca Cappa | ||
# Released under the term specified in file LICENSE.txt | ||
# SPDX short identifier: MIT | ||
# | ||
# The peculiarity of this workflow is that assumes vcpkg stored as a submodule of this repository. | ||
# The workflow runs on x64 and ARM platforms. | ||
# Workflow steps: | ||
# - Setup vcpkg and cache it on the GitHub Action cloud based cache. | ||
# - Runs CMake with CMakePreset.json using a presest configuration | ||
# that leverages the vcpkg's toolchain file. This will automatically run vcpkg | ||
# to install dependencies described by the vcpkg.json manifest file. | ||
# This stage also runs vcpkg with Binary Caching leveraging GitHub Action cache to | ||
# store the built packages artifacts, hence it will be a no-op if those are restored | ||
# from cache (e.g., already previously built). | ||
# - Finally builds the sources with Ninja, and tests as well. | ||
name: hosted-ninja-vcpkg_submod-autocache | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- v11 | ||
- main | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
|
||
jobs: | ||
job: | ||
name: ${{ matrix.os }}-${{ github.workflow }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
[ | ||
ubuntu-latest, | ||
macos-latest, | ||
windows-latest, | ||
buildjet-2vcpu-ubuntu-2204-arm, | ||
] | ||
#env: | ||
# | ||
# [OPTIONAL] Define the vcpkg's triplet | ||
# you want to enforce, otherwise the default one | ||
# for the hosting system will be automatically | ||
# choosen (x64 is the default on all platforms, | ||
# e.g. x64-osx). | ||
# VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: lukka/get-cmake@latest | ||
|
||
- name: Setup and run vcpkg | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
vcpkgJsonGlob: "vcpkg.json" | ||
|
||
# Note: if the preset misses the "configuration", it is possible to explicitly select the | ||
# configuration with the additional `--config` flag, e.g.: | ||
# buildPreset: 'ninja-vcpkg' | ||
# buildPresetAdditionalArgs: "[`--config`, `Release`]" | ||
# testPreset: 'ninja-vcpkg' | ||
# testPresetAdditionalArgs: "[`--config`, `Release`]" | ||
- name: Run CMake + vcpkg + Ninja | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
configurePreset: "ninja-multi-vcpkg" | ||
buildPreset: "ninja-vcpkg-release" |
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
build/ | ||
.vscode/ | ||
builds/ | ||
src/config.h | ||
src/Makefile | ||
stitch | ||
|
This file contains 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,3 @@ | ||
[submodule "vcpkg"] | ||
path = vcpkg | ||
url = https://github.com/microsoft/vcpkg.git |
This file contains 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 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,46 @@ | ||
{ | ||
"version": 3, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 21, | ||
"patch": 0 | ||
}, | ||
"configurePresets": [ | ||
{ | ||
"name": "ninja-multi-vcpkg", | ||
"displayName": "Ninja Multi-Config", | ||
"description": "Configure with vcpkg toolchain and generate Ninja project files for all configurations", | ||
"binaryDir": "${sourceDir}/builds/${presetName}", | ||
"generator": "Ninja Multi-Config", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": { | ||
"type": "FILEPATH", | ||
"value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake" | ||
} | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "ninja-vcpkg-debug", | ||
"configurePreset": "ninja-multi-vcpkg", | ||
"displayName": "Build (Debug)", | ||
"description": "Build with Ninja/vcpkg (Debug)", | ||
"configuration": "Debug" | ||
}, | ||
{ | ||
"name": "ninja-vcpkg-release", | ||
"configurePreset": "ninja-multi-vcpkg", | ||
"displayName": "Build (Release)", | ||
"description": "Build with Ninja/vcpkg (Release)", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ninja-vcpkg", | ||
"configurePreset": "ninja-multi-vcpkg", | ||
"displayName": "Build", | ||
"description": "Build with Ninja/vcpkg" | ||
} | ||
], | ||
"testPresets": [] | ||
} |
This file contains 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 |
---|---|---|
@@ -1,8 +1,71 @@ | ||
find_path(GEOTIFF_INCLUDE_DIR geotiffio.h PATH_SUFFIXES include) | ||
find_library(GEOTIFF_LIBRARY NAMES geotiff) | ||
set(GEOTIFF_INCLUDE_DIRS ${GEOTIFF_INCLUDE_DIR}) | ||
set(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR) | ||
mark_as_advanced(GEOTIFF_INCLUDE_DIR GEOTIFF_LIBRARY) | ||
############################################################################### | ||
# | ||
# CMake module to search for GeoTIFF library | ||
# | ||
# On success, the macro sets the following variables: | ||
# GEOTIFF_FOUND = if the library found | ||
# GEOTIFF_LIBRARIES = full path to the library | ||
# GEOTIFF_INCLUDE_DIR = where to find the library headers | ||
# also defined, but not for general use are | ||
# GEOTIFF_LIBRARY, where to find the PROJ.4 library. | ||
# | ||
# Copyright (c) 2009 Mateusz Loskot <[email protected]> | ||
# | ||
# Module source: http://github.com/mloskot/workshop/tree/master/cmake/ | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
# | ||
############################################################################### | ||
|
||
SET(GEOTIFF_NAMES geotiff) | ||
|
||
IF(WIN32) | ||
|
||
IF(MINGW) | ||
FIND_PATH(GEOTIFF_INCLUDE_DIR | ||
geotiff.h | ||
PATH_PREFIXES geotiff | ||
PATHS | ||
/usr/local/include | ||
/usr/include | ||
c:/msys/local/include) | ||
|
||
FIND_LIBRARY(GEOTIFF_LIBRARY | ||
NAMES ${GEOTIFF_NAMES} | ||
PATHS | ||
/usr/local/lib | ||
/usr/lib | ||
c:/msys/local/lib) | ||
ENDIF(MINGW) | ||
|
||
IF(MSVC) | ||
SET(GEOTIFF_INCLUDE_DIR "$ENV{LIB_DIR}/include" CACHE STRING INTERNAL) | ||
|
||
SET(GEOTIFF_NAMES ${GEOTIFF_NAMES} geotiff_i) | ||
FIND_LIBRARY(GEOTIFF_LIBRARY NAMES | ||
NAMES ${GEOTIFF_NAMES} | ||
PATHS | ||
"$ENV{LIB_DIR}/lib" | ||
/usr/lib | ||
c:/msys/local/lib) | ||
ENDIF(MSVC) | ||
|
||
ELSEIF(UNIX) | ||
|
||
FIND_PATH(GEOTIFF_INCLUDE_DIR geotiff.h PATH_PREFIXES geotiff) | ||
|
||
FIND_LIBRARY(GEOTIFF_LIBRARY NAMES ${GEOTIFF_NAMES}) | ||
|
||
ELSE() | ||
MESSAGE("FindGeoTIFF.cmake: unrecognized or unsupported operating system") | ||
ENDIF() | ||
|
||
IF(GEOTIFF_FOUND) | ||
SET(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY}) | ||
ENDIF() | ||
|
||
# Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR) |
This file contains 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,4 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | ||
"dependencies": ["libpng", "libjpeg-turbo", "curl", "tiff", "libgeotiff"] | ||
} |