[lerc] Add lerc port (#13358)

Co-authored-by: Nathan Mercer <nmercer@intermap.com>
This commit is contained in:
Nathan 2020-09-09 13:47:16 -06:00 committed by GitHub
parent 7946a1d71e
commit 765c780526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 0 deletions

4
ports/lerc/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: lerc
Version: 2.2
Homepage: https://github.com/Esri/lerc
Description: An open-source image or raster format which supports rapid encoding and decoding for any pixel type

View File

@ -0,0 +1,16 @@
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d22ad11..e90fcdd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ file(GLOB SOURCES
)
message(${SOURCES})
-add_library(LercLib SHARED ${SOURCES})
+add_library(LercLib ${SOURCES})
target_link_libraries (LercLib)

View File

@ -0,0 +1,16 @@
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ececeed..d22ad11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ install(
TARGETS LercLib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

22
ports/lerc/portfile.cmake Normal file
View File

@ -0,0 +1,22 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Esri/lerc
REF v2.2
SHA512 5ddf1e8f0c123d3c1329e980021e25e6ff9b79c96588115e5b48ba7637f0b2bf3ebb2ab6ebf94cfbde45ea1521f14405f669e23f0b74d9ae8f9b2cf80a908215
HEAD_REF master
PATCHES
"install_lib_to_archive_path.patch"
"enable_static_build.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)