cmake: Improve SDL driver integration
This commit is contained in:
parent
831c23e2ac
commit
734c5cd421
2 changed files with 10 additions and 8 deletions
|
@ -18,4 +18,10 @@ function(ugfx_target_setup TARGET)
|
|||
${ugfx_DEFS}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
${ugfx_LIBS}
|
||||
)
|
||||
|
||||
endfunction()
|
||||
|
|
|
@ -12,17 +12,13 @@ list(APPEND ugfx_DEFS
|
|||
GFX_OS_PRE_INIT_FUNCTION=sdl_driver_init
|
||||
)
|
||||
|
||||
list(APPEND ugfx_LIBS
|
||||
SDL2::SDL2
|
||||
)
|
||||
|
||||
# Find SDL2
|
||||
find_package(
|
||||
SDL2
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
# Setup target
|
||||
function(ugfx_driver_setup_SDL TARGET)
|
||||
target_link_libraries(
|
||||
${TARGET}
|
||||
PRIVATE
|
||||
SDL2::SDL2
|
||||
)
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Reference in a new issue