From 67b0907e52af7d88a76b71c182a2457707b839bb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 21 Apr 2019 11:08:33 -0700 Subject: [PATCH] Add globaldefs.pri for setting qmake values in each project --- AntiHooking/AntiHooking.pro | 6 +----- app/app.pro | 6 +----- globaldefs.pri | 13 +++++++++++++ h264bitstream/h264bitstream.pro | 9 +++------ moonlight-common-c/moonlight-common-c.pro | 12 +++++++----- qmdnsengine/qmdnsengine.pro | 16 ++++++++++------ soundio/soundio.pro | 20 ++++++-------------- 7 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 globaldefs.pri diff --git a/AntiHooking/AntiHooking.pro b/AntiHooking/AntiHooking.pro index d7d684db..44250e5d 100644 --- a/AntiHooking/AntiHooking.pro +++ b/AntiHooking/AntiHooking.pro @@ -3,11 +3,7 @@ QT -= core gui TARGET = AntiHooking TEMPLATE = lib -# Support debug and release builds from command line for CI -CONFIG += debug_and_release - -# Ensure symbols are always generated -CONFIG += force_debug_info +include(../globaldefs.pri) INCLUDEPATH += $$PWD/../libs/windows/include contains(QT_ARCH, i386) { diff --git a/app/app.pro b/app/app.pro index 6fa19f7d..5671bcad 100644 --- a/app/app.pro +++ b/app/app.pro @@ -8,11 +8,7 @@ unix:!macx { TARGET = Moonlight } -# Support debug and release builds from command line for CI -CONFIG += debug_and_release - -# Ensure symbols are always generated -CONFIG += force_debug_info +include(../globaldefs.pri) # Precompile QML files to avoid writing qmlcache on portable versions. # Since this binds the app against the Qt runtime version, we will only diff --git a/globaldefs.pri b/globaldefs.pri new file mode 100644 index 00000000..c71fa991 --- /dev/null +++ b/globaldefs.pri @@ -0,0 +1,13 @@ +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + +# Ensure symbols are always generated +CONFIG += force_debug_info + +# Disable asserts on release builds +CONFIG(release, debug|release) { + DEFINES += NDEBUG +} + +# Enable ASan if desired +#CONFIG += sanitizer sanitize_address \ No newline at end of file diff --git a/h264bitstream/h264bitstream.pro b/h264bitstream/h264bitstream.pro index 4a6328dc..14f76084 100644 --- a/h264bitstream/h264bitstream.pro +++ b/h264bitstream/h264bitstream.pro @@ -10,18 +10,15 @@ QT -= core gui TARGET = h264bitstream TEMPLATE = lib -# Support debug and release builds from command line for CI -CONFIG += debug_and_release - -# Ensure symbols are always generated -CONFIG += force_debug_info - # Build a static library CONFIG += staticlib # Disable warnings CONFIG += warn_off +# Include global qmake defs +include(../globaldefs.pri) + # Older GCC versions defaulted to GNU89 *-g++ { QMAKE_CFLAGS += -std=gnu99 diff --git a/moonlight-common-c/moonlight-common-c.pro b/moonlight-common-c/moonlight-common-c.pro index 299fdc9f..9906e696 100644 --- a/moonlight-common-c/moonlight-common-c.pro +++ b/moonlight-common-c/moonlight-common-c.pro @@ -9,11 +9,14 @@ QT -= core gui TARGET = moonlight-common-c TEMPLATE = lib -# Support debug and release builds from command line for CI -CONFIG += debug_and_release +# Build a static library +CONFIG += staticlib -# Ensure symbols are always generated -CONFIG += force_debug_info +# Disable warnings +CONFIG += warn_off + +# Include global qmake defs +include(../globaldefs.pri) win32 { INCLUDEPATH += $$PWD/../libs/windows/include @@ -65,7 +68,6 @@ INCLUDEPATH += \ $$RS_DIR \ $$ENET_DIR/include \ $$COMMON_C_DIR/src -CONFIG += warn_off staticlib DEFINES += HAS_SOCKLEN_T CONFIG(debug, debug|release) { diff --git a/qmdnsengine/qmdnsengine.pro b/qmdnsengine/qmdnsengine.pro index c0dc5fac..8d706977 100644 --- a/qmdnsengine/qmdnsengine.pro +++ b/qmdnsengine/qmdnsengine.pro @@ -4,11 +4,17 @@ QT += network TARGET = qmdnsengine TEMPLATE = lib -# Support debug and release builds from command line for CI -CONFIG += debug_and_release +# Build a static library +CONFIG += staticlib -# Ensure symbols are always generated -CONFIG += force_debug_info +# Disable warnings +CONFIG += warn_off + +# C++11 is required to build +CONFIG += c++11 + +# Include global qmake defs +include(../globaldefs.pri) QMDNSE_DIR = $$PWD/qmdnsengine/src DEFINES += \ @@ -66,5 +72,3 @@ SOURCES += \ INCLUDEPATH += \ $$QMDNSE_DIR/include \ $$PWD/qmdnsengine - -CONFIG += warn_off staticlib c++11 diff --git a/soundio/soundio.pro b/soundio/soundio.pro index b6c87f17..8c722e91 100644 --- a/soundio/soundio.pro +++ b/soundio/soundio.pro @@ -9,15 +9,15 @@ QT -= core gui TARGET = soundio TEMPLATE = lib -# Support debug and release builds from command line for CI -CONFIG += debug_and_release - -# Ensure symbols are always generated -CONFIG += force_debug_info - # Build a static library CONFIG += staticlib +# Disable warnings +CONFIG += warn_off + +# Include global qmake defs +include(../globaldefs.pri) + # Force MSVC to compile C as C++ for atomic support *-msvc { QMAKE_CFLAGS += /TP @@ -28,9 +28,6 @@ CONFIG += staticlib QMAKE_CFLAGS += -std=gnu99 } -# Disable warnings -CONFIG += warn_off - unix:!macx { CONFIG += link_pkgconfig @@ -44,11 +41,6 @@ unix:!macx { } } -CONFIG(release, debug|release) { - # Disable asserts on release builds - DEFINES += NDEBUG -} - DEFINES += \ SOUNDIO_STATIC_LIBRARY \ SOUNDIO_VERSION_MAJOR=1 \