From 7af7045c6385fe342a3976a013f56a94630eaa85 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 8 Aug 2020 18:56:26 -0400 Subject: [PATCH] Use system GTK, GDK, X11, find with pkg-config --- indra/cmake/UI.cmake | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 77fd505df36..2944f169f1b 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -15,12 +15,12 @@ if (USESYSTEMLIBS) gmodule-2.0 gtk+-2.0 gthread-2.0 - libpng pango pangoft2 pangox pangoxft - sdl + x11 + xinerama ) endif (LINUX) @@ -32,36 +32,35 @@ if (USESYSTEMLIBS) add_definitions(${${pkg}_CFLAGS_OTHERS}) endforeach(pkg) else (USESYSTEMLIBS) - if (LINUX) - use_prebuilt_binary(gtk-atk-pango-glib) - endif (LINUX) if (LINUX) - set(UI_LIBRARIES - atk-1.0 - gdk-x11-2.0 - gdk_pixbuf-2.0 - Xinerama + include(FindPkgConfig) + + set(PKGCONFIG_PACKAGES + atk + cairo + gdk-2.0 + gdk-pixbuf-2.0 glib-2.0 gmodule-2.0 - gobject-2.0 + gtk+-2.0 gthread-2.0 - gtk-x11-2.0 - pango-1.0 - pangoft2-1.0 - pangox-1.0 - pangoxft-1.0 - ${FREETYPE_LIBRARIES} + pango + pangoft2 + pangox + pangoxft + x11 + xinerama ) - endif (LINUX) - include_directories ( - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include - ) - foreach(include ${${LL_ARCH}_INCLUDES}) - include_directories(${LIBS_PREBUILT_DIR}/include/${include}) - endforeach(include) + foreach(pkg ${PKGCONFIG_PACKAGES}) + pkg_check_modules(${pkg} REQUIRED ${pkg}) + include_directories(${${pkg}_INCLUDE_DIRS}) + link_directories(${${pkg}_LIBRARY_DIRS}) + list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES}) + add_definitions(${${pkg}_CFLAGS_OTHERS}) + endforeach(pkg) + endif (LINUX) endif (USESYSTEMLIBS) if (LINUX) -- GitLab