Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Meel <ankitjmeel@gmail.com>2020-10-13 14:04:14 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-10-13 14:04:43 +0300
commit666485f38ca5abe89db042635572bd2a06fb7896 (patch)
treead6e1324d0469c67c9ca5e37d9b3398719323f0e /build_files
parent6b21b827048fa6e7eb5e6da007e66f2fcf248f3e (diff)
CMake/macOS: find ZLib before setting CMAKE_PREFIX_PATH
https://devtalk.blender.org/t/building-blender-on-macos-fails/15756/ In some cases, CMake finds the Zlib supplied with OpenCollada pre-compiled libraries, and not the system one.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake19
1 files changed, 9 insertions, 10 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index fa64016392c..020f8defdc0 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -44,6 +44,15 @@ function(print_found_status
endif()
endfunction()
+# ------------------------------------------------------------------------
+# Find system provided libraries.
+
+# Find system ZLIB, not the pre-compiled one supplied with OpenCollada.
+set(ZLIB_ROOT /usr)
+find_package(ZLIB REQUIRED)
+find_package(BZip2 REQUIRED)
+list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
+
if(NOT DEFINED LIBDIR)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
# Prefer lib directory paths
@@ -56,16 +65,6 @@ if(NOT EXISTS "${LIBDIR}/")
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
-
-# ------------------------------------------------------------------------
-# Find system provided libraries.
-
-# Find system ZLIB, not the pre-compiled one supplied with OpenCollada.
-set(ZLIB_ROOT /usr)
-find_package(ZLIB REQUIRED)
-find_package(BZip2 REQUIRED)
-list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
-
# -------------------------------------------------------------------------
# Find precompiled libraries, and avoid system or user-installed ones.