cmake: add SDL_DBUS option to enable/disable DBUS

This commit is contained in:
Anonymous Maarten 2022-08-26 02:37:57 +02:00 committed by Sam Lantinga
parent 032ff64041
commit c8b56ee5e6
1 changed files with 10 additions and 6 deletions

View File

@ -440,6 +440,7 @@ set_option(SDL_SSE3 "Use SSE3 assembly routines" ${OPT_DEF_SSEMAT
set_option(SDL_ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM}) set_option(SDL_ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM})
set_option(SDL_ARMSIMD "use SIMD assembly blitters on ARM" OFF) set_option(SDL_ARMSIMD "use SIMD assembly blitters on ARM" OFF)
set_option(SDL_ARMNEON "use NEON assembly blitters on ARM" OFF) set_option(SDL_ARMNEON "use NEON assembly blitters on ARM" OFF)
dep_option(SDL_DBUS "Enable D-Bus support" ON ${UNIX_SYS} OFF)
set_option(SDL_DISKAUDIO "Support the disk writer audio driver" ON) set_option(SDL_DISKAUDIO "Support the disk writer audio driver" ON)
set_option(SDL_DUMMYAUDIO "Support the dummy audio driver" ON) set_option(SDL_DUMMYAUDIO "Support the dummy audio driver" ON)
set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF) set_option(SDL_DIRECTFB "Use DirectFB video driver" OFF)
@ -1431,12 +1432,15 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
endif() endif()
if(PKG_CONFIG_FOUND) if(PKG_CONFIG_FOUND)
if(SDL_DBUS)
pkg_search_module(DBUS dbus-1 dbus) pkg_search_module(DBUS dbus-1 dbus)
if(DBUS_FOUND) if(DBUS_FOUND)
set(HAVE_DBUS_DBUS_H TRUE) set(HAVE_DBUS_DBUS_H TRUE)
target_include_directories(sdl-build-options INTERFACE "${DBUS_INCLUDE_DIRS}") target_include_directories(sdl-build-options INTERFACE "${DBUS_INCLUDE_DIRS}")
# Fcitx need only dbus. # Fcitx need only dbus.
set(HAVE_FCITX TRUE) set(HAVE_FCITX TRUE)
set(HAVE_DBUS TRUE)
endif()
endif() endif()
pkg_search_module(IBUS ibus-1.0 ibus) pkg_search_module(IBUS ibus-1.0 ibus)