Create and use sdl::sdl target
parent
bed0b80374
commit
5f7c74fa2e
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue