Skip to content

Commit 485d852

Browse files
committed
[filament] add zstd dependency
1 parent 7c15483 commit 485d852

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

ports/filament/0002-external.patch

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 06f044b8f..cd14a12cc 100644
2+
index 06f044b8f..b4fb8ce52 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -23,6 +23,8 @@ option(FILAMENT_TESTS "Build tests" ON)
@@ -69,7 +69,7 @@ index 06f044b8f..cd14a12cc 100644
6969
+ endif()
7070
+
7171
+ list(FIND external_subdirectories "${subdirectory}" has_subdirectory)
72-
+ if(NOT ${${package_name}_FOUND} AND ${has_subdirectory} EQUAL -1)
72+
+ if(NOT ${${package_name}_FOUND} AND ${has_subdirectory} EQUAL -1 AND EXISTS "${EXTERNAL}/${subdirectory}")
7373
+ add_subdirectory(${EXTERNAL}/${subdirectory})
7474
+ list(APPEND external_subdirectories ${subdirectory})
7575
+ endif()
@@ -93,7 +93,7 @@ index 06f044b8f..cd14a12cc 100644
9393
+ endif()
9494
+
9595
+ list(FIND external_subdirectories "${subdirectory}" has_subdirectory)
96-
+ if(NOT ${found} AND ${has_subdirectory} EQUAL -1)
96+
+ if(NOT ${found} AND ${has_subdirectory} EQUAL -1 AND EXISTS "${EXTERNAL}/${subdirectory}")
9797
+ add_subdirectory(${EXTERNAL}/${subdirectory})
9898
+ list(APPEND external_subdirectories ${subdirectory})
9999
+ endif()
@@ -108,7 +108,7 @@ index 06f044b8f..cd14a12cc 100644
108108
add_subdirectory(${LIBRARIES}/camutils)
109109
add_subdirectory(${LIBRARIES}/filabridge)
110110
add_subdirectory(${LIBRARIES}/filaflat)
111-
@@ -751,21 +824,24 @@ add_subdirectory(${LIBRARIES}/utils)
111+
@@ -751,21 +824,25 @@ add_subdirectory(${LIBRARIES}/utils)
112112
add_subdirectory(${LIBRARIES}/viewer)
113113
add_subdirectory(${FILAMENT}/filament)
114114
add_subdirectory(${FILAMENT}/shaders)
@@ -117,6 +117,7 @@ index 06f044b8f..cd14a12cc 100644
117117
-add_subdirectory(${EXTERNAL}/imgui/tnt)
118118
-add_subdirectory(${EXTERNAL}/robin-map/tnt)
119119
-add_subdirectory(${EXTERNAL}/smol-v/tnt)
120+
+add_external_library("zstd" "zstd/tnt" "zstd::libzstd" "zstd")
120121
+add_external_library("basisu" "basisu/tnt" "basisu::basisu;basisu::basisu_encoder;basisu::basisu_encoder" "basisu;basis_encoder;basis_transcoder")
121122
+add_external_library("civetweb" "civetweb/tnt" "civetweb::civetweb;civetweb::civetweb-cpp" "civetweb;civetweb-cpp")
122123
+if(TARGET civetweb::civetweb AND TARGET civetweb::civetweb-cpp)
@@ -146,7 +147,7 @@ index 06f044b8f..cd14a12cc 100644
146147

147148
# Note that this has to be placed after mikktspace in order for combine_static_libs to work.
148149
add_subdirectory(${LIBRARIES}/geometry)
149-
@@ -773,9 +849,25 @@ add_subdirectory(${LIBRARIES}/geometry)
150+
@@ -773,9 +850,25 @@ add_subdirectory(${LIBRARIES}/geometry)
150151
if (FILAMENT_BUILD_FILAMAT OR IS_HOST_PLATFORM)
151152
# spirv-tools must come before filamat, as filamat relies on the presence of the
152153
# spirv-tools_SOURCE_DIR variable.
@@ -175,7 +176,7 @@ index 06f044b8f..cd14a12cc 100644
175176
add_subdirectory(${LIBRARIES}/filamat)
176177

177178
# the material debugger requires filamat
178-
@@ -786,9 +878,9 @@ endif()
179+
@@ -786,9 +879,9 @@ endif()
179180

180181
if (FILAMENT_SUPPORTS_VULKAN)
181182
add_subdirectory(${LIBRARIES}/bluevk)
@@ -187,7 +188,7 @@ index 06f044b8f..cd14a12cc 100644
187188
endif()
188189

189190
set(FILAMENT_SAMPLES_BINARY_DIR ${PROJECT_BINARY_DIR}/samples)
190-
@@ -809,11 +901,11 @@ if (IS_HOST_PLATFORM)
191+
@@ -809,11 +902,11 @@ if (IS_HOST_PLATFORM)
191192

192193
add_subdirectory(${FILAMENT}/samples)
193194

ports/filament/vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"name": "vcpkg-cmake",
4141
"host": true
4242
},
43-
"zlib"
43+
"zlib",
44+
"zstd"
4445
]
4546
}

versions/f-/filament.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"versions": [
33
{
4-
"git-tree": "335011c119ffa08ac031fbf771ed0b3acbcae870",
4+
"git-tree": "e00a181bbbebafc94adc9fff22bcafbdec080dca",
55
"version-semver": "1.55.0",
66
"port-version": 0
77
}

0 commit comments

Comments
 (0)