summarylogtreecommitdiffstats
path: root/osgearth_unbundle.patch
blob: 5c986a315db1d97f2d1b906346ed3736c28852e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff -aurN osgearth-osgearth-3.8.orig/src/osgEarthDrivers/gltf/CMakeLists.txt osgearth-osgearth-3.8/src/osgEarthDrivers/gltf/CMakeLists.txt
--- osgearth-osgearth-3.8.orig/src/osgEarthDrivers/gltf/CMakeLists.txt	2026-03-07 12:10:22.694184988 +0200
+++ osgearth-osgearth-3.8/src/osgEarthDrivers/gltf/CMakeLists.txt	2026-03-07 12:10:47.813942688 +0200
@@ -16,7 +16,7 @@
     
 include_directories(
     ${OSGEARTH_EMBEDDED_THIRD_PARTY_DIR}/tinygltf 
-    ${OSGEARTH_EMBEDDED_THIRD_PARTY_DIR}/rapidjson/include/rapidjson )
+    /usr/include/rapidjson )
 
 if (draco_FOUND)
     #include_directories(${draco_INCLUDE_DIRS})
diff -aurN osgearth-osgearth-3.8.orig/src/osgEarthDrivers/lerc/CMakeLists.txt osgearth-osgearth-3.8/src/osgEarthDrivers/lerc/CMakeLists.txt
--- osgearth-osgearth-3.8.orig/src/osgEarthDrivers/lerc/CMakeLists.txt	2026-03-07 12:10:22.698441756 +0200
+++ osgearth-osgearth-3.8/src/osgEarthDrivers/lerc/CMakeLists.txt	2026-03-07 12:14:21.433195032 +0200
@@ -4,12 +4,6 @@
     TARGET osgdb_lerc
     SOURCES
         ReaderWriterLERC.cpp
-        ../../third_party/lerc/src/LercLib/BitMask.cpp
-        ../../third_party/lerc/src/LercLib/BitStuffer2.cpp
-        ../../third_party/lerc/src/LercLib/Huffman.cpp
-        ../../third_party/lerc/src/LercLib/Lerc.cpp
-        ../../third_party/lerc/src/LercLib/Lerc_c_api_impl.cpp
-        ../../third_party/lerc/src/LercLib/Lerc2.cpp
-        ../../third_party/lerc/src/LercLib/RLE.cpp
-        ../../third_party/lerc/src/LercLib/Lerc1Decode/BitStuffer.cpp
-        ../../third_party/lerc/src/LercLib/Lerc1Decode/CntZImage.cpp )
\ No newline at end of file
+)
+
+target_link_libraries(osgdb_lerc PRIVATE Lerc)
diff -aurN osgearth-osgearth-3.8.orig/src/osgEarthDrivers/lerc/ReaderWriterLERC.cpp osgearth-osgearth-3.8/src/osgEarthDrivers/lerc/ReaderWriterLERC.cpp
--- osgearth-osgearth-3.8.orig/src/osgEarthDrivers/lerc/ReaderWriterLERC.cpp	2026-03-07 12:10:22.698494510 +0200
+++ osgearth-osgearth-3.8/src/osgEarthDrivers/lerc/ReaderWriterLERC.cpp	2026-03-07 12:12:48.966519512 +0200
@@ -159,7 +159,7 @@
 
         // Decode the image
         unsigned int bandOffset = 0;
-        hr = lerc_decode((const unsigned char*)(data.get()), length, 0, numDims, width, height, numBands, dataType, (void*)output);
+        hr = lerc_decode((const unsigned char*)(data.get()), length, 0, 0, numDims, width, height, numBands, dataType, (void*)output);
         if (hr)
         {
             delete[]output;
@@ -333,7 +333,7 @@
 
         hr = lerc_computeCompressedSize((void*)imageData,    // raw image data, row by row, band by band
             dataType, numDims, width, height, numBands,
-            0,
+            0, 0,
             maxZError,           // max coding error per pixel, or precision
             &numBytesNeeded);    // size of outgoing Lerc blob
         if (hr)
@@ -347,7 +347,7 @@
 
         hr = lerc_encode((void*)imageData,    // raw image data, row by row, band by band
             dataType, numDims, width, height, numBands,
-            0,         // can give nullptr if all pixels are valid
+            0, 0,      // can give nullptr if all pixels are valid
             maxZError,           // max coding error per pixel, or precision
             pLercBlob,           // buffer to write to, function will fail if buffer too small
             numBytesBlob,        // buffer size