create target ll::uilibraries to have one common target that defines what each
operation system needs as dependencies on OS gui libraries.meow-7.2.2
parent
f673b958fe
commit
924fa0fa78
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue