aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-05-09 12:38:12 -0700
committerChris Robinson <[email protected]>2022-05-09 12:38:12 -0700
commitc870e550fa37d10e8a9d7d15ef1d6370d1e0399e (patch)
treeda7489113d46f666e35f38078511c3ee8a66b592 /CMakeLists.txt
parent5c55ec2f9bd972510454a04ccb40238f4cd0219c (diff)
Don't enable RTKit/D-Bus support on Windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt63
1 files changed, 33 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea646617..d3945e95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -677,39 +677,42 @@ set(CORE_OBJS
core/voice_change.h)
set(HAVE_RTKIT 0)
-option(ALSOFT_REQUIRE_RTKIT "Require RTKit/D-Bus support" FALSE)
-find_package(DBus1 QUIET)
-if(NOT DBus1_FOUND AND PkgConfig_FOUND)
- pkg_check_modules(DBUS dbus-1)
-endif()
-if(DBus1_FOUND OR DBUS_FOUND)
- option(ALSOFT_RTKIT "Enable RTKit support" ON)
- if(ALSOFT_RTKIT)
- set(HAVE_RTKIT 1)
- set(CORE_OBJS ${CORE_OBJS} core/dbus_wrap.cpp core/dbus_wrap.h core/rtkit.cpp core/rtkit.h)
- if(NOT DBus1_FOUND)
- set(INC_PATHS ${INC_PATHS} ${DBUS_INCLUDE_DIRS})
- set(CPP_DEFS ${CPP_DEFS} ${DBUS_CFLAGS_OTHER})
- if(NOT WIN32 AND NOT HAVE_DLFCN_H)
- set(EXTRA_LIBS ${EXTRA_LIBS} ${DBUS_LINK_LIBRARIES})
+if(NOT WIN32)
+ option(ALSOFT_REQUIRE_RTKIT "Require RTKit/D-Bus support" FALSE)
+ find_package(DBus1 QUIET)
+ if(NOT DBus1_FOUND AND PkgConfig_FOUND)
+ pkg_check_modules(DBUS dbus-1)
+ endif()
+ if(DBus1_FOUND OR DBUS_FOUND)
+ option(ALSOFT_RTKIT "Enable RTKit support" ON)
+ if(ALSOFT_RTKIT)
+ set(HAVE_RTKIT 1)
+ set(CORE_OBJS ${CORE_OBJS} core/dbus_wrap.cpp core/dbus_wrap.h
+ core/rtkit.cpp core/rtkit.h)
+ if(NOT DBus1_FOUND)
+ set(INC_PATHS ${INC_PATHS} ${DBUS_INCLUDE_DIRS})
+ set(CPP_DEFS ${CPP_DEFS} ${DBUS_CFLAGS_OTHER})
+ if(NOT HAVE_DLFCN_H)
+ set(EXTRA_LIBS ${EXTRA_LIBS} ${DBUS_LINK_LIBRARIES})
+ endif()
+ elseif(HAVE_DLFCN_H)
+ set(INC_PATHS ${INC_PATHS} ${DBus1_INCLUDE_DIRS})
+ set(CPP_DEFS ${CPP_DEFS} ${DBus1_DEFINITIONS})
+ else()
+ set(EXTRA_LIBS ${EXTRA_LIBS} ${DBus1_LIBRARIES})
endif()
- elseif(WIN32 OR HAVE_DLFCN_H)
- set(INC_PATHS ${INC_PATHS} ${DBus1_INCLUDE_DIRS})
- set(CPP_DEFS ${CPP_DEFS} ${DBus1_DEFINITIONS})
- else()
- set(EXTRA_LIBS ${EXTRA_LIBS} ${DBus1_LIBRARIES})
endif()
+ else()
+ set(MISSING_VARS "")
+ if(NOT DBus1_INCLUDE_DIRS)
+ set(MISSING_VARS "${MISSING_VARS} DBus1_INCLUDE_DIRS")
+ endif()
+ if(NOT DBus1_LIBRARIES)
+ set(MISSING_VARS "${MISSING_VARS} DBus1_LIBRARIES")
+ endif()
+ message(STATUS "Could NOT find DBus1 (missing:${MISSING_VARS})")
+ unset(MISSING_VARS)
endif()
-else()
- set(MISSING_VARS "")
- if(NOT DBus1_INCLUDE_DIRS)
- set(MISSING_VARS "${MISSING_VARS} DBus1_INCLUDE_DIRS")
- endif()
- if(NOT DBus1_LIBRARIES)
- set(MISSING_VARS "${MISSING_VARS} DBus1_LIBRARIES")
- endif()
- message(STATUS "Could NOT find DBus1 (missing:${MISSING_VARS})")
- unset(MISSING_VARS)
endif()
if(ALSOFT_REQUIRE_RTKIT AND NOT HAVE_RTKIT)
message(FATAL_ERROR "Failed to enabled required RTKit support")