aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan <35282710+nazame@users.noreply.github.com>2020-10-09 00:35:45 -0600
committerGitHub <noreply@github.com>2020-10-08 23:35:45 -0700
commit95c0643813ad529c0fc1be8d66517b25ab131dd5 (patch)
treedf4f7f571c145c26f061b6196ce16bb70e7be5f2
parentf8c439c3ed7a1e566bb0e1470e59d49f7340891d (diff)
downloadvcpkg-95c0643813ad529c0fc1be8d66517b25ab131dd5.tar.gz
vcpkg-95c0643813ad529c0fc1be8d66517b25ab131dd5.zip
[lerc] Export Package (#13724)
Co-authored-by: Nathan Mercer <nmercer@intermap.com> Co-authored-by: wangli28 <wangli28@beyondsoft.com>
-rw-r--r--ports/lerc/CONTROL1
-rw-r--r--ports/lerc/create_package.patch26
-rw-r--r--ports/lerc/portfile.cmake2
3 files changed, 29 insertions, 0 deletions
diff --git a/ports/lerc/CONTROL b/ports/lerc/CONTROL
index 54f928539..6be5d0a75 100644
--- a/ports/lerc/CONTROL
+++ b/ports/lerc/CONTROL
@@ -1,4 +1,5 @@
Source: lerc
Version: 2.2
+Port-Version: 1
Homepage: https://github.com/Esri/lerc
Description: An open-source image or raster format which supports rapid encoding and decoding for any pixel type
diff --git a/ports/lerc/create_package.patch b/ports/lerc/create_package.patch
new file mode 100644
index 000000000..7b06c119b
--- /dev/null
+++ b/ports/lerc/create_package.patch
@@ -0,0 +1,26 @@
+ CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e90fcdd..17c79e8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,7 +17,7 @@ add_library(LercLib ${SOURCES})
+ target_link_libraries (LercLib)
+
+ install(
+- TARGETS LercLib
++ TARGETS LercLib EXPORT LercTargets
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -28,3 +28,9 @@ install(
+ FILES "include/Lerc_types.h" "include/Lerc_c_api.h"
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
++
++install(EXPORT LercTargets
++ FILE lercConfig.cmake
++ NAMESPACE Esri::
++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/lerc"
++)
diff --git a/ports/lerc/portfile.cmake b/ports/lerc/portfile.cmake
index 44695d79f..5b3060f43 100644
--- a/ports/lerc/portfile.cmake
+++ b/ports/lerc/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
"install_lib_to_archive_path.patch"
"enable_static_build.patch"
+ "create_package.patch"
)
vcpkg_configure_cmake(
@@ -15,6 +16,7 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")