summaryrefslogtreecommitdiff
path: root/indra/cmake/LLWindow.cmake
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
commitf1095d78315818642e62b7f4af9984557e176b5d (patch)
tree3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/cmake/LLWindow.cmake
parent4042ed9701fcfa42c03fc285a757aa348f800e33 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
Diffstat (limited to 'indra/cmake/LLWindow.cmake')
-rw-r--r--indra/cmake/LLWindow.cmake42
1 files changed, 11 insertions, 31 deletions
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 80af7ff2ab..b36e970560 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -4,39 +4,19 @@ include(Variables)
include(GLEXT)
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindSDL)
+include_guard()
+add_library( ll::SDL INTERFACE IMPORTED )
- # This should be done by FindSDL. Sigh.
- mark_as_advanced(
- SDLMAIN_LIBRARY
- SDL_INCLUDE_DIR
- SDL_LIBRARY
- )
-else (USESYSTEMLIBS)
- if (LINUX)
- use_prebuilt_binary(SDL)
- set (SDL_FOUND TRUE)
- set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux)
- set (SDL_LIBRARY SDL directfb fusion direct X11)
- endif (LINUX)
-endif (USESYSTEMLIBS)
-if (SDL_FOUND)
- include_directories(${SDL_INCLUDE_DIR})
-endif (SDL_FOUND)
+if (LINUX)
+ #Must come first as use_system_binary can exit this file early
+ target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
-set(LLWINDOW_INCLUDE_DIRS
- ${GLEXT_INCLUDE_DIR}
- ${LIBS_OPEN_DIR}/llwindow
- )
+ use_system_binary(SDL)
+ use_prebuilt_binary(SDL)
+
+ target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
+ target_link_libraries( ll::SDL INTERFACE SDL directfb fusion direct X11)
+endif (LINUX)
-if (BUILD_HEADLESS)
- set(LLWINDOW_HEADLESS_LIBRARIES
- llwindowheadless
- )
-endif (BUILD_HEADLESS)
- set(LLWINDOW_LIBRARIES
- llwindow
- )