From 6c750b0fdbd112926044e190e8d8405c65cbea2a Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 4 Aug 2026 14:19:00 +0500 Subject: [PATCH] build-all: fix opencollada patch to support it being buildable as shared --- nix/build-all.py | 6 +++--- ...on_unix.patch => config_select_libs_by_use_shared.patch} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename nix/patches/opencollada/{allow_static_libraries_config_on_unix.patch => config_select_libs_by_use_shared.patch} (95%) diff --git a/nix/build-all.py b/nix/build-all.py index 0f93b4bf34..af5256c5ed 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1112,9 +1112,9 @@ if "libxml2" in targets: if "OpenCOLLADA" in targets: patches = ["./patches/opencollada/pr622_and_disable_subdirs.patch"] - # This patch allows static libraries config on Unix, - # because the config is weird and doesn't allow non-shared libraries on Unix. - patches.append("./patches/opencollada/allow_static_libraries_config_on_unix.patch") + # OpenCOLLADAConfig.cmake.in hardcodes shared-lib targets on Unix regardless of + # whether shared libs were actually built. We make it follow `USE_SHARED` instead. + patches.append("./patches/opencollada/config_select_libs_by_use_shared.patch") if "wasm" in flags: # This is necessary for the WASM build, because recent versions of diff --git a/nix/patches/opencollada/allow_static_libraries_config_on_unix.patch b/nix/patches/opencollada/config_select_libs_by_use_shared.patch similarity index 95% rename from nix/patches/opencollada/allow_static_libraries_config_on_unix.patch rename to nix/patches/opencollada/config_select_libs_by_use_shared.patch index 936d5c2029..4548fd71aa 100644 --- a/nix/patches/opencollada/allow_static_libraries_config_on_unix.patch +++ b/nix/patches/opencollada/config_select_libs_by_use_shared.patch @@ -7,7 +7,7 @@ index d765b108..6800c2a7 100644 # Set the library variable -if(UNIX) -+if(0) ++if(@USE_SHARED@) set(OPENCOLLADA_LIBRARIES ftoa_shared buffer_shared