]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
cmake: put the macOS libffi hack in FindGLIB instead of FindGTKGLExt
authorThomas Debesse <dev@illwieckz.net>
Tue, 4 Jun 2019 22:16:51 +0000 (00:16 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 13:22:23 +0000 (15:22 +0200)
cmake/FindGLIB.cmake
cmake/FindGtkGLExt.cmake

index 4b1b26504b27c0ee2beb6b1aea50f2a1619a22f2..cf12399e3f95c8d24043058a1bff32eb92e6e229 100644 (file)
@@ -1,5 +1,10 @@
 find_package(PkgConfig)
 if (PKG_CONFIG_FOUND)
+    if (APPLE)
+        # libffi is provided by base system so brew does not take the risk to override it
+        # hence then need for an explicit look-up
+        set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig")
+    endif ()
     if (GLIB_FIND_REQUIRED)
         set(_pkgconfig_REQUIRED REQUIRED)
     endif ()
index 40a0c858b19a334dad7e68eae0251bfb053de7fd..8fa486e570fdb09b933a5d842d1d2f61a17562e8 100644 (file)
@@ -4,9 +4,6 @@ if (PKG_CONFIG_FOUND)
         set(_pkgconfig_REQUIRED REQUIRED)
     endif ()
     if (APPLE)
-        # libffi is provided by base system so brew does not take the risk to override it
-        # hence then need for an explicit look-up
-        set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig")
         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-1.0 gtkglext-quartz-1.0)
     elseif (XWINDOWS)
         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0)