From 9a807a06859f85341c1decb5a363265d6bc916a4 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 14 Oct 2018 11:26:29 -0700 Subject: [PATCH] Prevent asserts from being compiled into moonlight-common-c and soundio in release builds --- moonlight-common-c/moonlight-common-c.pro | 2 +- soundio/soundio.pro | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/moonlight-common-c/moonlight-common-c.pro b/moonlight-common-c/moonlight-common-c.pro index 7f73d074..f62b30bc 100644 --- a/moonlight-common-c/moonlight-common-c.pro +++ b/moonlight-common-c/moonlight-common-c.pro @@ -67,7 +67,7 @@ INCLUDEPATH += \ CONFIG += warn_off staticlib DEFINES += HAS_SOCKLEN_T -debug { +CONFIG(debug, debug|release) { # Enable asserts on debug builds DEFINES += LC_DEBUG } diff --git a/soundio/soundio.pro b/soundio/soundio.pro index 9c5c0d47..b6c87f17 100644 --- a/soundio/soundio.pro +++ b/soundio/soundio.pro @@ -44,6 +44,11 @@ unix:!macx { } } +CONFIG(release, debug|release) { + # Disable asserts on release builds + DEFINES += NDEBUG +} + DEFINES += \ SOUNDIO_STATIC_LIBRARY \ SOUNDIO_VERSION_MAJOR=1 \