diff options
author | Brad Linden <brad@lindenlab.com> | 2023-03-29 14:54:06 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2023-03-29 14:54:06 -0700 |
commit | a548c169899734b7d6af1a1870dab1ad1eb74e3c (patch) | |
tree | a347ee3cd54b7bcb317061af9af2abb2a6dad243 /indra/cmake/LLWindow.cmake | |
parent | b130831106d058f0be5414a9a3bcaa99636c7bc0 (diff) | |
parent | c7053a6928fd5eafdc935453742e92951ae4e0c1 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/cmake/LLWindow.cmake')
-rw-r--r-- | indra/cmake/LLWindow.cmake | 42 |
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 - ) |