Fix for -ldbus-1 not found in /usr/local/lib in FreeBSD

This commit is contained in:
F. Duncanh
2026-03-12 18:51:59 -04:00
parent c846fed67e
commit 5a79fc3b5f

View File

@@ -37,6 +37,11 @@ if( UNIX AND NOT APPLE )
if (DBUS_FOUND ) if (DBUS_FOUND )
add_definitions(-DDBUS ) add_definitions(-DDBUS )
include_directories(${DBUS_INCLUDE_DIRS}) include_directories(${DBUS_INCLUDE_DIRS})
#FreeBSD has this Library in /usr/local/lib
find_library (DBUS_LIBRARY NAMES dbus-1 PATHS /usr/local/lib)
if (NOT DBUS_LIBRARY)
message(FATAL_ERROR "libdbus-1 not found")
endif()
endif() endif()
endif() endif()
@@ -59,14 +64,9 @@ if ( GST_MACOS )
endif() endif()
add_executable( uxplay uxplay.cpp ) add_executable( uxplay uxplay.cpp )
target_link_libraries( uxplay target_link_libraries( uxplay renderers airplay )
renderers
airplay
)
if (DBUS_FOUND) if (DBUS_FOUND)
target_link_libraries( uxplay target_link_libraries( uxplay ${DBUS_LIBRARY})
${DBUS_LIBRARIES}
)
endif() endif()
install( TARGETS uxplay RUNTIME DESTINATION bin ) install( TARGETS uxplay RUNTIME DESTINATION bin )