mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
silence avah_compat nag with AVAHI_COMPAT_NOWARN=1
uses putenv; conditional compilation set in CMakelists.txt
This commit is contained in:
@@ -4,6 +4,8 @@ project(uxplay)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
add_definitions(-DAVAHI_COMPAT_NOWARN)
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
link_libraries(${X11_LIBRARIES})
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
|
||||
@@ -106,6 +106,12 @@ int main(int argc, char *argv[]) {
|
||||
bool use_audio = true;
|
||||
bool debug_log = DEFAULT_DEBUG_LOG;
|
||||
|
||||
#ifdef AVAHI_COMPAT_NOWARN
|
||||
//suppress avahi_compat nag message
|
||||
char avahi_compat_nowarn[] = "AVAHI_COMPAT_NOWARN==1";
|
||||
putenv(avahi_compat_nowarn);
|
||||
#endif
|
||||
|
||||
// Parse arguments
|
||||
for (int i = 1; i < argc; i++) {
|
||||
std::string arg(argv[i]);
|
||||
|
||||
Reference in New Issue
Block a user