diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/LLWindow.cmake | 16 | ||||
-rw-r--r-- | indra/llrender/CMakeLists.txt | 7 | ||||
-rw-r--r-- | indra/llwindow/CMakeLists.txt | 8 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 13 |
4 files changed, 10 insertions, 34 deletions
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index ac14ead0de..d0dca3dfdd 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -4,6 +4,11 @@ include(Variables) include(GLEXT) include(Prebuilt) +if( TARGET sdl::sdl) + return() +endif() +create_target(sdl::sdl) + if (USESYSTEMLIBS) include(FindSDL) @@ -16,15 +21,10 @@ if (USESYSTEMLIBS) 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) + set_target_include_dirs( sdl::sdl ${LIBS_PREBUILT_DIR}/i686-linux) + set_target_libraries( sdl::sdl SDL directfb fusion direct X11) + target_compile_definitions( sdl::sdl INTERFACE LL_SDL=1) endif (LINUX) endif (USESYSTEMLIBS) -if (SDL_FOUND) - include_directories(${SDL_INCLUDE_DIR}) -endif (SDL_FOUND) - - diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 7d42043613..cb98886f9b 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -91,12 +91,6 @@ endif (BUILD_HEADLESS) add_library (llrender ${llrender_SOURCE_FILES}) set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR}) -if (SDL_FOUND) - set_property(TARGET llrender - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llrender @@ -106,6 +100,7 @@ target_link_libraries(llrender llfilesystem llxml llwindow + sdl::sdl freetype::freetype OpenGL::GL OpenGL::GLU diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 952fbbb56f..2b5a03d219 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -174,11 +174,5 @@ endif (llwindow_HEADER_FILES) ${viewer_SOURCE_FILES} ) -if (SDL_FOUND) - set_property(TARGET llwindow - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - -target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} sdl::sdl) set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9168941014..eccc082454 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1715,17 +1715,6 @@ add_executable(${VIEWER_BINARY_NAME} ${viewer_SOURCE_FILES} ) -if (SDL_FOUND) - set_property(TARGET ${VIEWER_BINARY_NAME} - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - -if (USE_BUGSPLAT) - set_property(TARGET ${VIEWER_BINARY_NAME} - PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) - # add package files file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST ${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py) @@ -1989,10 +1978,8 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcorehttp llcommon ${viewer_LIBRARIES} - ${FMODWRAPPER_LIBRARY} # must come after LLAudio glod::glod ndof::ndof - ${SDL_LIBRARY} ${SMARTHEAP_LIBRARY} ${UI_LIBRARIES} ${WINDOWS_LIBRARIES} |