summaryrefslogtreecommitdiff
path: root/indra/cmake/UI.cmake
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-03-31 11:57:48 -0500
committerDave Parks <davep@lindenlab.com>2023-03-31 11:57:48 -0500
commit7d144fcb2a1b0aff1b59e378c652649c3d03e94f (patch)
treede3bfe3ce90677cc4d7ab25b8aeaf5853c009068 /indra/cmake/UI.cmake
parent0fe09bd968b987605123e99efb2fa040a988a942 (diff)
parente4173ea5cc1ef9b1677ac87a0f7c8acbe73414ee (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/cmake/UI.cmake')
-rw-r--r--indra/cmake/UI.cmake107
1 files changed, 46 insertions, 61 deletions
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index 77fd505df3..8b70192efc 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -2,68 +2,53 @@
include(Prebuilt)
include(FreeType)
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
-
- if (LINUX)
- set(PKGCONFIG_PACKAGES
- atk
- cairo
- gdk-2.0
- gdk-pixbuf-2.0
- glib-2.0
- gmodule-2.0
- gtk+-2.0
- gthread-2.0
- libpng
- pango
- pangoft2
- pangox
- pangoxft
- sdl
- )
- endif (LINUX)
+add_library( ll::uilibraries INTERFACE IMPORTED )
- 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)
-else (USESYSTEMLIBS)
- if (LINUX)
- use_prebuilt_binary(gtk-atk-pango-glib)
- endif (LINUX)
+if (LINUX)
+ target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 )
- if (LINUX)
- set(UI_LIBRARIES
- atk-1.0
- gdk-x11-2.0
- gdk_pixbuf-2.0
- Xinerama
- glib-2.0
- gmodule-2.0
- gobject-2.0
- gthread-2.0
- gtk-x11-2.0
- pango-1.0
- pangoft2-1.0
- pangox-1.0
- pangoxft-1.0
- ${FREETYPE_LIBRARIES}
- )
- endif (LINUX)
+ if( USE_CONAN )
+ target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk )
+ return()
+ endif()
+ use_prebuilt_binary(gtk-atk-pango-glib)
+
+ target_link_libraries( ll::uilibraries INTERFACE
+ atk-1.0
+ gdk-x11-2.0
+ gdk_pixbuf-2.0
+ Xinerama
+ glib-2.0
+ gmodule-2.0
+ gobject-2.0
+ gthread-2.0
+ gtk-x11-2.0
+ pango-1.0
+ pangoft2-1.0
+ pangox-1.0
+ pangoxft-1.0
+ Xinerama
+ ll::freetype
+ )
+endif (LINUX)
+if( WINDOWS )
+ target_link_libraries( ll::uilibraries INTERFACE
+ opengl32
+ comdlg32
+ dxguid
+ kernel32
+ odbc32
+ odbccp32
+ oleaut32
+ shell32
+ Vfw32
+ wer
+ winspool
+ imm32
+ )
+endif()
- include_directories (
- ${LIBS_PREBUILT_DIR}/include
- ${LIBS_PREBUILT_DIR}/include
- )
- foreach(include ${${LL_ARCH}_INCLUDES})
- include_directories(${LIBS_PREBUILT_DIR}/include/${include})
- endforeach(include)
-endif (USESYSTEMLIBS)
+target_include_directories( ll::uilibraries SYSTEM INTERFACE
+ ${LIBS_PREBUILT_DIR}/include
+ )
-if (LINUX)
- add_definitions(-DLL_GTK=1 -DLL_X11=1)
-endif (LINUX)