156 lines
3.4 KiB
Prolog
156 lines
3.4 KiB
Prolog
#
|
|
# Singe 2
|
|
# Copyright (C) 2019 Scott Duensing <scott@kangaroopunch.com>
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
|
|
# We're just a boring old C app
|
|
TEMPLATE = app
|
|
CONFIG += console
|
|
CONFIG -= app_bundle
|
|
CONFIG -= qt
|
|
|
|
# Keep binaries to themselves
|
|
DESTDIR = $$OUT_PWD/build
|
|
|
|
# Make Visual C shut up about stupidness
|
|
win32 {
|
|
DEFINES *= \
|
|
_CRT_SECURE_NO_WARNINGS \
|
|
_CRT_NONSTDC_NO_DEPRECATE
|
|
MSVC_VER = $$(VisualStudioVersion)
|
|
if(equals(MSVC_VER, 14.0)|greaterThan(MSVC_VER, 14.0)) {
|
|
message("Timespec is defined")
|
|
DEFINES *= HAVE_STRUCT_TIMESPEC
|
|
}
|
|
}
|
|
|
|
# Determine Bitness - This is just broken
|
|
win32 {
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
CONFIG *= bits64
|
|
} else {
|
|
CONFIG *= bits32
|
|
}
|
|
} else {
|
|
*-64 | *_64 {
|
|
CONFIG *= bits64
|
|
} else {
|
|
CONFIG *= bits32
|
|
}
|
|
}
|
|
BITNESS="64"
|
|
bits32:BITNESS="32"
|
|
# HACK HACK HACK due to above
|
|
BITNESS="64"
|
|
CONFIG -= bits32
|
|
CONFIG += bits64
|
|
|
|
# === Third Party Builds ===
|
|
|
|
BUILDTHIRDARGS = \"$$PWD/thirdparty\" \"$$OUT_PWD/../thirdparty-build\" $$BITNESS
|
|
win32 {
|
|
# Placeholder - doesn't work
|
|
BUILDTHIRD.commands = cmd.exe /c $$PWD\\preBuild.bat $$BUILDTHIRDARGS
|
|
} else {
|
|
BUILDTHIRD.commands = bash $$PWD/preBuild.sh $$BUILDTHIRDARGS
|
|
}
|
|
BUILDTHIRD.target = this
|
|
PRE_TARGETDEPS += this
|
|
QMAKE_EXTRA_TARGETS += BUILDTHIRD
|
|
|
|
# === ManyMouse ===
|
|
|
|
MANYMOUSE_INCLUDES = \
|
|
$$PWD/thirdparty/manymouse
|
|
|
|
MANYMOUSE_HEADERS = \
|
|
$$PWD/thirdparty/manymouse/manymouse.h
|
|
|
|
MANYMOUSE_SOURCES = \
|
|
$$PWD/thirdparty/manymouse/linux_evdev.c \
|
|
$$PWD/thirdparty/manymouse/macosx_hidmanager.c \
|
|
$$PWD/thirdparty/manymouse/macosx_hidutilities.c \
|
|
$$PWD/thirdparty/manymouse/manymouse.c \
|
|
$$PWD/thirdparty/manymouse/windows_wminput.c \
|
|
$$PWD/thirdparty/manymouse/x11_xinput2.c
|
|
|
|
# === SINGE ===
|
|
|
|
QMAKE_CFLAGS += \
|
|
-isystem $$MANYMOUSE_INCLUDES \
|
|
-isystem $$PWD/../thirdparty-build/$$BITNESS/installed/include
|
|
|
|
HEADERS += \
|
|
$$MANYMOUSE_HEADERS \
|
|
stddclmr.h \
|
|
thirdparty/uthash.h \
|
|
common.h \
|
|
util.h \
|
|
videoPlayer.h \
|
|
singe.h \
|
|
extensions.h
|
|
|
|
SOURCES += \
|
|
$$MANYMOUSE_SOURCES \
|
|
util.c \
|
|
videoPlayer.c \
|
|
singe.c \
|
|
main.c
|
|
|
|
LIBS += \
|
|
-L$$PWD/../thirdparty-build/$$BITNESS/installed/lib \
|
|
-l:libSDL2.a \
|
|
-l:libSDL2_image.a \
|
|
-l:libpng16.a \
|
|
-l:libwebp.a \
|
|
-l:libjpeg.a \
|
|
-l:libSDL2_mixer.a \
|
|
-l:libFLAC.a \
|
|
-l:libmodplug.a \
|
|
-l:libmpg123.a \
|
|
-l:libvorbisfile.a \
|
|
-l:libvorbis.a \
|
|
-l:libogg.a \
|
|
-l:libopusfile.a \
|
|
-l:libopus.a \
|
|
-l:libSDL2_ttf.a \
|
|
-l:libfreetype.a \
|
|
-l:libharfbuzz.a \
|
|
-l:liblua.a \
|
|
-l:libffms2.a \
|
|
-l:libavformat.a \
|
|
-l:libavcodec.a \
|
|
-l:libswscale.a \
|
|
-l:libavutil.a \
|
|
-l:libswresample.a \
|
|
-l:libz.a \
|
|
-l:liblzma.a \
|
|
-l:libbz2.a \
|
|
-lpthread \
|
|
-lXv \
|
|
-lX11 \
|
|
-lXext \
|
|
-lm \
|
|
-ldl \
|
|
-lrt
|
|
|
|
OTHER_FILES += \
|
|
preBuild.sh \
|
|
postLink.sh
|
|
|
|
# Strip & UPX the final result
|
|
#linux:QMAKE_POST_LINK += bash $$PWD/postLink.sh "$$PWD" "$$DESTDIR"
|