summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-16 17:28:26 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-16 17:28:26 +0200
commit924fa0fa78b41c7e8486c1ed29764afb1e32fd7e (patch)
tree5f13a9c20e73cda7ad3b07f1d620f3812cfcf7e7 /indra
parentf673b958fe36b19e999ab881255006d1d1d94bc0 (diff)
create target ll::uilibraries to have one common target that defines what each
operation system needs as dependencies on OS gui libraries.
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/UI.cmake27
-rw-r--r--indra/linux_crash_logger/CMakeLists.txt4
-rw-r--r--indra/llmath/CMakeLists.txt2
-rw-r--r--indra/llwindow/CMakeLists.txt6
-rw-r--r--indra/newview/CMakeLists.txt36
5 files changed, 35 insertions, 40 deletions
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index ee95547136..03eb1b3fc4 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -6,8 +6,10 @@ if (LINUX)
use_prebuilt_binary(gtk-atk-pango-glib)
endif (LINUX)
+create_target( ll::uilibraries )
+
if (LINUX)
- set(UI_LIBRARIES
+ set_target_libraries( ll::uilibraries
atk-1.0
gdk-x11-2.0
gdk_pixbuf-2.0
@@ -21,12 +23,27 @@ if (LINUX)
pangoft2-1.0
pangox-1.0
pangoxft-1.0
- ${FREETYPE_LIBRARIES}
+ Xinerama
+ ll::freetype
)
endif (LINUX)
+if( WINDOWS )
+ set_target_libraries( ll::uilibraries
+ opengl32
+ comdlg32
+ dxguid
+ kernel32
+ odbc32
+ odbccp32
+ oleaut32
+ shell32
+ Vfw32
+ wer
+ winspool
+ )
+endif()
-include_directories (
- ${LIBS_PREBUILT_DIR}/include
+set_target_include_dirs( ll::uilibraries
${LIBS_PREBUILT_DIR}/include
)
@@ -51,5 +68,5 @@ include_directories (
#endforeach(include)
if (LINUX)
- add_definitions(-DLL_GTK=1 -DLL_X11=1)
+ set_target_properties(ll::uilibraries PROPERTIES COMPILE_DEFINITIONS LL_GTK=1 LL_X11=1 )
endif (LINUX)
diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt
index daa78f77ff..594cb34ce4 100644
--- a/indra/linux_crash_logger/CMakeLists.txt
+++ b/indra/linux_crash_logger/CMakeLists.txt
@@ -68,9 +68,7 @@ target_link_libraries(linux-crash-logger
llmath
llcorehttp
llcommon
- ${UI_LIBRARIES}
- ll::freetype
- ${LIBRT_LIBRARY}
+ ll::uilibraries
)
add_custom_target(linux-crash-logger-target ALL
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index fd7b831719..4c4e59811d 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -122,7 +122,7 @@ if (LL_TESTS)
LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}")
# INTEGRATION TESTS
- set(test_libs llmath llcommon ${WINDOWS_LIBRARIES})
+ set(test_libs llmath llcommon)
# TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}")
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index c997bbdf59..4c2f8149b4 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -59,9 +59,9 @@ set(llwindow_LINK_LIBRARIES
# Sort by high-level to low-level
if (LINUX)
set(llwindow_LINK_LIBRARIES APPEND
- ${UI_LIBRARIES} # for GTK
- ${SDL_LIBRARY}
- fontconfig # For FCInit and other FC* functions.
+ ll::uilibraries
+ ll::sdl
+ ll::fontconfig # For FCInit and other FC* functions.
)
list(APPEND viewer_SOURCE_FILES
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 500794bab1..3ec0c2179c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1409,12 +1409,6 @@ if (LINUX)
LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
- set(viewer_LIBRARIES
- Xinerama
- )
- if (OPENAL)
- LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
- endif (OPENAL)
endif (LINUX)
if (WINDOWS)
@@ -1540,21 +1534,6 @@ if (WINDOWS)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
-# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs)
- set(viewer_LIBRARIES
- opengl32
- comdlg32
- dxguid
- kernel32
- odbc32
- odbccp32
- oleaut32
- shell32
- Vfw32
- wer
- winspool
- )
-
find_library(INTEL_MEMOPS_LIBRARY
NAMES ll_intel_memops
PATHS
@@ -1563,8 +1542,10 @@ if (WINDOWS)
)
mark_as_advanced(INTEL_MEMOPS_LIBRARY)
+
if (INTEL_MEMOPS_LIBRARY)
- list(APPEND viewer_LIBRARIES ${INTEL_MEMOPS_LIBRARY})
+ create_target( ll::intel_memops )
+ set_target_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} )
endif (INTEL_MEMOPS_LIBRARY)
if (ADDRESS_SIZE EQUAL 64)
@@ -1576,9 +1557,6 @@ if (WINDOWS)
LIST(APPEND viewer_SOURCE_FILES windows.manifest)
endif (ADDRESS_SIZE EQUAL 64)
- if (OPENAL)
- LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
- endif (OPENAL)
endif (WINDOWS)
# Add the xui files. This is handy for searching for xui elements
@@ -1950,11 +1928,9 @@ target_link_libraries(${VIEWER_BINARY_NAME}
llmath
llcorehttp
llcommon
- ${viewer_LIBRARIES}
ll::glod
ll::ndof
- ${SMARTHEAP_LIBRARY}
- ${UI_LIBRARIES}
+ ll::uilibraries
lllogin
llprimitive
llappearance
@@ -1963,6 +1939,10 @@ target_link_libraries(${VIEWER_BINARY_NAME}
ll::bugsplat
)
+if( TARGET ll::intel_memops )
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops )
+endif()
+
if( TARGET ll::nvapi )
target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi )
endif()