[Bf-blender-cvs] [8c8abae9710] tmp-vfx-platform-2023: Fix collada patch apply issue on macOS
Brecht Van Lommel
noreply at git.blender.org
Mon Nov 28 18:35:51 CET 2022
Commit: 8c8abae97104ebf5e72bbc33fe4c4f8d934e75b4
Author: Brecht Van Lommel
Date: Mon Nov 28 16:16:44 2022 +0100
Branches: tmp-vfx-platform-2023
https://developer.blender.org/rB8c8abae97104ebf5e72bbc33fe4c4f8d934e75b4
Fix collada patch apply issue on macOS
===================================================================
M build_files/build_environment/cmake/check_software.cmake
M build_files/build_environment/cmake/opencollada.cmake
===================================================================
diff --git a/build_files/build_environment/cmake/check_software.cmake b/build_files/build_environment/cmake/check_software.cmake
index 903c2c3022f..34544ca176b 100644
--- a/build_files/build_environment/cmake/check_software.cmake
+++ b/build_files/build_environment/cmake/check_software.cmake
@@ -19,7 +19,9 @@ if(UNIX)
yasm
)
- if(NOT APPLE)
+ if(APPLE)
+ list(APPEND _required_software dos2unix)
+ else()
list(APPEND _required_software patchelf)
endif()
@@ -53,7 +55,7 @@ if(UNIX)
" apt install autoconf automake bison libtool yasm tcl ninja-build meson python3-mako patchelf\n"
"\n"
"On macOS (with homebrew):\n"
- " brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n"
+ " brew install autoconf automake bison dos2unix flex libtool meson ninja pkg-config yasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")
diff --git a/build_files/build_environment/cmake/opencollada.cmake b/build_files/build_environment/cmake/opencollada.cmake
index b1a3028debd..9e403f25181 100644
--- a/build_files/build_environment/cmake/opencollada.cmake
+++ b/build_files/build_environment/cmake/opencollada.cmake
@@ -9,13 +9,17 @@ if(UNIX)
# as does the OPENCOLLADA package, if this can be corrected upstream that would be better.
# For now use `sed` to force UNIX line endings so the patch applies.
# Needed as neither ignoring white-space or applying as a binary resolve this problem.
+ if(APPLE)
+ set(_dos2unix dos2unix)
+ else()
+ set(_dos2unix sed -i "s/\\r//")
+ endif()
set(PATCH_MAYBE_DOS2UNIX_CMD
- sed -i "s/\\r//"
+ ${_dos2unix}
${PATCH_DIR}/opencollada.diff
${BUILD_DIR}/opencollada/src/external_opencollada/CMakeLists.txt
${BUILD_DIR}/opencollada/src/external_opencollada/Externals/LibXML/CMakeLists.txt &&
)
-
else()
set(OPENCOLLADA_EXTRA_ARGS
-DCMAKE_DEBUG_POSTFIX=_d
More information about the Bf-blender-cvs
mailing list