-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Expand file tree
/
Copy pathfix_apple.patch
More file actions
90 lines (76 loc) · 2.58 KB
/
fix_apple.patch
File metadata and controls
90 lines (76 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 763d32e9..6b957da8 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -26,7 +26,6 @@ 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})
@@ -56,4 +56,5 @@ if(NOT DEFINED LIBDIR)
endif()
+if(0)
if(NOT EXISTS "${LIBDIR}/.git")
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
@@ -61,9 +61,10 @@ if(FIRST_RUN)
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
endif()
+endif()
# Avoid searching for headers since this would otherwise override our lib
# directory as well as PYTHON_ROOT_DIR.
-set(CMAKE_FIND_FRAMEWORK NEVER)
+set(CMAKE_FIND_FRAMEWORK LAST)
# Optionally use system Python if PYTHON_ROOT_DIR is specified.
if(WITH_PYTHON)
@@ -79,6 +81,5 @@ endif()
# Prefer lib directory paths
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
-set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
-
+list(APPEND CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
# -------------------------------------------------------------------------
# Find precompiled libraries, and avoid system or user-installed ones.
@@ -146,10 +148,13 @@ endif()
# FreeType compiled with Brotli compression for woff2.
find_package(Freetype REQUIRED)
+find_package(Brotli REQUIRED)
+if(0)
set(BROTLI_LIBRARIES
${LIBDIR}/brotli/lib/libbrotlicommon-static.a
${LIBDIR}/brotli/lib/libbrotlidec-static.a
)
+endif()
if(WITH_HARFBUZZ)
find_package(Harfbuzz)
@@ -232,16 +237,16 @@ if(WITH_SDL)
endif()
endif()
-set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
+# set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
find_package(Epoxy REQUIRED)
-set(PNG_ROOT ${LIBDIR}/png)
+# set(PNG_ROOT ${LIBDIR}/png)
find_package(PNG REQUIRED)
-set(JPEG_ROOT ${LIBDIR}/jpeg)
+# set(JPEG_ROOT ${LIBDIR}/jpeg)
find_package(JPEG REQUIRED)
-set(TIFF_ROOT ${LIBDIR}/tiff)
+# set(TIFF_ROOT ${LIBDIR}/tiff)
find_package(TIFF REQUIRED)
if(WITH_IMAGE_WEBP)
@@ -292,6 +297,7 @@ if(WITH_PUGIXML)
find_package(PugiXML REQUIRED)
endif()
+set(OPENCOLORIO_ROOT_DIR ${VCPKG_CURRENT_INSTALLED_DIR})
find_package(OpenImageIO REQUIRED)
add_bundled_libraries(openimageio/lib)
@@ -391,7 +397,7 @@ if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
endif()
endif()
-set(ZSTD_ROOT_DIR ${LIBDIR}/zstd)
+set(ZSTD_ROOT_DIR ${VCPKG_CURRENT_INSTALLED_DIR})
find_package(Zstd REQUIRED)
if(EXISTS ${LIBDIR})