Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could NOT find DBus1 (missing: DBus1_INCLUDE_DIRS DBus1_LIBRARIES) #1079

Open
ryandesign opened this issue Dec 11, 2024 · 1 comment
Open

Comments

@ryandesign
Copy link

On macOS 12 with the openal-soft 1.24.1 source extracted, I'm running cmake with the -DALSOFT_RTKIT=OFF flag, among others.

When ALSOFT_RTKIT is falsy, find_package(DBus1 QUIET) does not get run.

However cmake prints this message (and then continues successfully and the build works):

-- Could NOT find DBus1 (missing: DBus1_INCLUDE_DIRS DBus1_LIBRARIES)

It seems to me that if I have disabled the feature that requires dbus, and the build does not attempt to find dbus, it should not print a message that dbus could not be found.

This is the code:

openal-soft/CMakeLists.txt

Lines 688 to 722 in 6790234

option(ALSOFT_RTKIT "Enable RTKit support" ON)
option(ALSOFT_REQUIRE_RTKIT "Require RTKit/D-Bus support" FALSE)
if(ALSOFT_RTKIT)
find_package(DBus1 QUIET)
if(NOT DBus1_FOUND AND PkgConfig_FOUND)
pkg_check_modules(DBUS dbus-1)
endif()
if(DBus1_FOUND OR DBUS_FOUND)
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()
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()

@kcat
Copy link
Owner

kcat commented Dec 11, 2024

Seems that else clause for printing about DBus missing was on the wrong nesting level. Should be fixed with commit e9b02a3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants