Skip to content

Commit e106970

Browse files
committed
fix epoxy
1 parent 4c7dae1 commit e106970

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

scripts/test_ports/vcpkg-ci-blender/fix_apple.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ index 763d32e9..6b957da8 100644
4242
endif()
4343

4444
-set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
45-
+set(EPOXY_ROOT_DIR ${CURRENT_INSTALLED_DIR})
45+
+# set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy)
4646
find_package(Epoxy REQUIRED)
4747

4848
-set(PNG_ROOT ${LIBDIR}/png)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/build_files/cmake/Modules/FindEpoxy.cmake b/build_files/cmake/Modules/FindEpoxy.cmake
2+
--- a/build_files/cmake/Modules/FindEpoxy.cmake
3+
+++ b/build_files/cmake/Modules/FindEpoxy.cmake
4+
@@ -9,6 +9,27 @@
5+
# This can also be an environment variable.
6+
# Epoxy_FOUND, If false, do not try to use epoxy.
7+
8+
+if(APPLE AND DEFINED CURRENT_INSTALLED_DIR)
9+
+ set(PKG_CONFIG_EXECUTABLE "$ENV{PKG_CONFIG}")
10+
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
11+
+ set(ENV{PKG_CONFIG_PATH}
12+
+ "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig:${CURRENT_INSTALLED_DIR}/lib/pkgconfig:${CURRENT_INSTALLED_DIR}/share/pkgconfig:$ENV{PKG_CONFIG_PATH}")
13+
+ else()
14+
+ set(ENV{PKG_CONFIG_PATH}
15+
+ "${CURRENT_INSTALLED_DIR}/lib/pkgconfig:${CURRENT_INSTALLED_DIR}/share/pkgconfig:$ENV{PKG_CONFIG_PATH}")
16+
+ endif()
17+
+ find_package(PkgConfig QUIET)
18+
+ if(PkgConfig_FOUND)
19+
+ pkg_check_modules(epoxy QUIET IMPORTED_TARGET epoxy)
20+
+ if(epoxy_FOUND)
21+
+ set(Epoxy_LIBRARY PkgConfig::epoxy)
22+
+ set(Epoxy_LIBRARIES PkgConfig::epoxy)
23+
+ set(Epoxy_INCLUDE_DIRS ${epoxy_INCLUDE_DIRS})
24+
+ list(GET epoxy_INCLUDE_DIRS 0 Epoxy_INCLUDE_DIR)
25+
+ endif()
26+
+ endif()
27+
+endif()
28+
+
29+
# If `EPOXY_ROOT_DIR` was defined in the environment, use it.
30+
if(DEFINED EPOXY_ROOT_DIR)
31+
# Pass.

scripts/test_ports/vcpkg-ci-blender/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ vcpkg_from_github(
1313
fix_dep.patch
1414
fix_openexr.patch
1515
fix_apple.patch
16+
fix_epoxy.patch
1617
fix_windows.patch
1718
dynamic-internal-libs.patch
1819
gl.patch

0 commit comments

Comments
 (0)