summaryrefslogtreecommitdiff
path: root/indra/cmake/UI.cmake
blob: 7dfb1aa84ef27b1f0ef866e6db89a9be075646b8 (plain)
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
# -*- cmake -*-
include(Prebuilt)
include(FreeType)
include(GLIB)

include_guard()
add_library( ll::uilibraries INTERFACE IMPORTED )

if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)
  if( USE_CONAN )
    return()
  endif()

  find_package(PkgConfig REQUIRED)
  pkg_check_modules(WAYLAND_CLIENT wayland-client)

  if(WAYLAND_CLIENT_FOUND)
      target_include_directories(ll::uilibraries INTERFACE ${WAYLAND_CLIENT_INCLUDE_DIRS})
      target_compile_definitions(ll::uilibraries INTERFACE LL_WAYLAND=1)
  else()
      message("pkgconfig could not find wayland client, compiling without full wayland support")
  endif()

  find_package(X11)
  if(X11_FOUND)
      target_compile_definitions(ll::uilibraries INTERFACE LL_X11=1)
  else()
      message("Could not find X11, compiling without full X11 support")
  endif()


  target_link_libraries( ll::uilibraries INTERFACE
          ll::fontconfig
          ll::freetype
          ll::SDL3
          ll::glib
          ll::gio
  )

endif ()
if( WINDOWS )
  target_link_libraries( ll::uilibraries INTERFACE
          opengl32
          comdlg32
          dxguid
          kernel32
          odbc32
          odbccp32
          oleaut32
          shell32
          Vfw32
          wer
          winspool
          imm32
          )
endif()

if (FALSE)
target_include_directories( ll::uilibraries SYSTEM INTERFACE
        ${LIBS_PREBUILT_DIR}/include
        )

endif ()