mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 13:37:56 +00:00
improvements to libdecor support in cmake
this makes it consistent with wayland support, and makes cmake side in line with autotools' libdecor support.
This commit is contained in:
@@ -701,9 +701,20 @@ macro(CheckWayland)
|
||||
pkg_check_modules(LIBDECOR libdecor-0)
|
||||
if(LIBDECOR_FOUND)
|
||||
set(HAVE_WAYLAND_LIBDECOR TRUE)
|
||||
FindLibraryAndSONAME(decor-0)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
|
||||
add_definitions(-DHAVE_LIBDECOR_H)
|
||||
set(HAVE_LIBDECOR_H 1)
|
||||
link_directories(${LIBDECOR_LIBRARY_DIRS})
|
||||
include_directories(${LIBDECOR_INCLUDE_DIRS})
|
||||
if(LIBDECOR_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
||||
else()
|
||||
set(HAVE_LIBDECOR_SHARED TRUE)
|
||||
FindLibraryAndSONAME(decor-0)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_LIBS ${LIBDECOR_LIBRARIES} ${EXTRA_LIBS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user