Skip to content

Commit 0414b23

Browse files
committed
Stop Xcode compressing .dae files.
1 parent aa03c80 commit 0414b23

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

tests/loadtests/CMakeLists.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,34 @@ elseif(WIN32)
223223
)
224224
endif()
225225

226-
set( LOAD_TEST_COMMON_MODELS
226+
set( LOAD_TEST_COLLADA_MODELS
227+
"teapot.dae"
228+
)
229+
list(TRANSFORM LOAD_TEST_COLLADA_MODELS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/common/models/")
230+
# An Xcode (or possibly CMake) update in late 2024 or early 2025 started
231+
# compressing .dae files when copying them to bundle resources. This piece
232+
# of undocumented magic makes it just copy. The Xcode GUI presents an option
233+
# menu on the file with "Copy" and "Compress" in the project settings browser.
234+
# This attribute sets it to "Copy."
235+
set_source_files_properties( ${LOAD_TEST_COLLADA_MODELS}
236+
PROPERTIES
237+
XCODE_FILE_ATTRIBUTES "--decompress"
238+
)
239+
240+
set( LOAD_TEST_OBJ_MODELS
227241
"cube.obj"
228242
"sphere.obj"
229-
"teapot.dae"
230243
"torusknot.obj"
231244
)
232-
list(TRANSFORM LOAD_TEST_COMMON_MODELS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/common/models/")
245+
list(TRANSFORM LOAD_TEST_OBJ_MODELS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/common/models/")
233246
# Hack to prevent *.obj 3D files being mistaken as linkable obj files
234-
set_source_files_properties( ${LOAD_TEST_COMMON_MODELS}
247+
set_source_files_properties( ${LOAD_TEST_OBJ_MODELS}
235248
PROPERTIES HEADER_FILE_ONLY TRUE
236249
)
250+
set( LOAD_TEST_COMMON_MODELS
251+
${LOAD_TEST_COLLADA_MODELS}
252+
${LOAD_TEST_OBJ_MODELS}
253+
)
237254

238255
# A custom loadtest_models target does not work as configure fails at
239256
# an install_target that uses this with an error "the target is not

0 commit comments

Comments
 (0)