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)
pkg_search_module(DBUS dbus-1 dbus) if(SDL_DBUS)
if(DBUS_FOUND) pkg_search_module(DBUS dbus-1 dbus)
set(HAVE_DBUS_DBUS_H TRUE) if(DBUS_FOUND)
target_include_directories(sdl-build-options INTERFACE "${DBUS_INCLUDE_DIRS}") set(HAVE_DBUS_DBUS_H TRUE)
# Fcitx need only dbus. target_include_directories(sdl-build-options INTERFACE "${DBUS_INCLUDE_DIRS}")
set(HAVE_FCITX TRUE) # Fcitx need only dbus.
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)