aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/lerc/create_package.patch
blob: 86e24ec17ccab764708801743ede97f0cfa00b54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab733f5..a52dc59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,11 +38,18 @@ endif()
 
 install(
     TARGETS Lerc
+    EXPORT LercTargets
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
     PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
 )
+target_include_directories(Lerc PUBLIC "$<INSTALL_INTERFACE:include>")
+install(EXPORT LercTargets
+  FILE unofficial-lerc-config.cmake
+  NAMESPACE unofficial::Lerc::
+  DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/unofficial-lerc"
+)
 
 # Handle both absolute paths (e.g. NixOS) and relative for a relocatable package
 if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")