blob: f952383a27260c9e3c079cd0ac78915821519c2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# -*- cmake -*-
include(Variables)
include(GLEXT)
include(Prebuilt)
include_guard()
add_library( ll::SDL INTERFACE IMPORTED )
if (NOT (USE_AUTOBUILD_3P OR USE_CONAN) AND NOT DARWIN)
include(FindPkgConfig)
pkg_check_modules(Sdl REQUIRED sdl)
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
target_include_directories(ll::SDL SYSTEM INTERFACE ${Sdl_INCLUDE_DIRS})
target_link_directories(ll::SDL INTERFACE ${Sdl_LIBRARY_DIRS})
target_link_libraries(ll::SDL INTERFACE ${Sdl_LIBRARIES} X11)
return ()
endif ()
if (LINUX)
#Must come first as use_system_binary can exit this file early
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
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)
|