Start of allowing for dynamic builds.
This commit is contained in:
parent
f365a11b2f
commit
15bf492127
2 changed files with 80 additions and 30 deletions
|
@ -27,11 +27,13 @@ if [[ -z $1 ]]; then
|
|||
G_BITS=32
|
||||
G_THIRDPARTY=$(pwd)/thirdparty
|
||||
G_DEST="$(pwd)/../thirdparty-build/${G_PLATFORM}/${G_BITS}"
|
||||
G_TYPE=static
|
||||
else
|
||||
G_THIRDPARTY=$1
|
||||
G_BITS=$3
|
||||
G_PLATFORM=$4
|
||||
G_DEST=$2/$4/$3
|
||||
G_TYPE=static
|
||||
fi
|
||||
|
||||
G_INSTALLED="${G_DEST}/installed"
|
||||
|
|
|
@ -27,35 +27,38 @@ CONFIG -= qt
|
|||
# Target Settings
|
||||
|
||||
TARGET = singeEmu
|
||||
CONFIG += platformLinux
|
||||
CONFIG += bits64
|
||||
CONFIG += platformPi # linux, pi, or mingw
|
||||
CONFIG += bits32 # bits32 or bits64
|
||||
CONFIG += dynamic # dyanmic or static
|
||||
|
||||
# Keep binaries to themselves
|
||||
|
||||
DESTDIR = $$OUT_PWD/build
|
||||
|
||||
# === Third Party Builds ===
|
||||
# Some variables for later
|
||||
|
||||
bits64 {
|
||||
BITNESS="64"
|
||||
} else {
|
||||
BITNESS="32"
|
||||
}
|
||||
platformLinux {
|
||||
PLATFORM="linux"
|
||||
} else {
|
||||
PLATFORM="mingw"
|
||||
}
|
||||
BUILDTHIRDARGS = \"$$PWD/thirdparty\" \"$$OUT_PWD/../thirdparty-build\" $$BITNESS $$PLATFORM
|
||||
win32 {
|
||||
platformLinux:PLATFORM="linux"
|
||||
platformMingw:PLATFORM="mingw"
|
||||
platformPi:PLATFORM="pi"
|
||||
|
||||
static {
|
||||
# === Third Party Builds ===
|
||||
BUILDTHIRDARGS = \"$$PWD/thirdparty\" \"$$OUT_PWD/../thirdparty-build\" $$BITNESS $$PLATFORM
|
||||
win32 {
|
||||
# Placeholder - doesn't work
|
||||
BUILDTHIRD.commands = cmd.exe /c $$PWD\\preBuild.bat $$BUILDTHIRDARGS
|
||||
} else {
|
||||
} else {
|
||||
BUILDTHIRD.commands = bash $$PWD/preBuild.sh $$BUILDTHIRDARGS
|
||||
}
|
||||
BUILDTHIRD.target = this
|
||||
PRE_TARGETDEPS += this
|
||||
QMAKE_EXTRA_TARGETS += BUILDTHIRD
|
||||
}
|
||||
BUILDTHIRD.target = this
|
||||
PRE_TARGETDEPS += this
|
||||
QMAKE_EXTRA_TARGETS += BUILDTHIRD
|
||||
|
||||
# === ManyMouse ===
|
||||
|
||||
|
@ -79,6 +82,12 @@ QMAKE_CFLAGS += \
|
|||
-isystem $$MANYMOUSE_INCLUDES \
|
||||
-isystem $$PWD/../thirdparty-build/$$PLATFORM/$$BITNESS/installed/include
|
||||
|
||||
dynamic {
|
||||
platformPi {
|
||||
QMAKE_CFLAGS += -I/usr/include/lua5.3
|
||||
}
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
$$MANYMOUSE_HEADERS \
|
||||
frameFile.h \
|
||||
|
@ -103,7 +112,6 @@ SOURCES += \
|
|||
|
||||
LIBS += \
|
||||
-L$$PWD/../thirdparty-build/$$PLATFORM/$$BITNESS/installed/lib \
|
||||
-l:everything.a \
|
||||
-lpthread \
|
||||
-lXv \
|
||||
-lX11 \
|
||||
|
@ -112,6 +120,46 @@ LIBS += \
|
|||
-ldl \
|
||||
-lrt
|
||||
|
||||
static {
|
||||
LIBS += \
|
||||
-l:everything.a
|
||||
}
|
||||
|
||||
dynamic {
|
||||
LIBS += \
|
||||
-lffms2 \
|
||||
-lavformat \
|
||||
-lavcodec \
|
||||
-lswscale \
|
||||
-lavutil \
|
||||
-lswresample \
|
||||
-lSDL2 \
|
||||
-lSDL2_image \
|
||||
-lSDL2_mixer \
|
||||
-lSDL2_ttf \
|
||||
-llua5.3 \
|
||||
-lz
|
||||
|
||||
platformPi {
|
||||
LIBS += \
|
||||
-L/opt/vc/lib \
|
||||
-lbcm_host \
|
||||
-lasound \
|
||||
-lXi \
|
||||
-lsndio \
|
||||
-lXcursor \
|
||||
-lXinerama \
|
||||
-lXrandr \
|
||||
-lXss \
|
||||
-lXxf86vm \
|
||||
-lmmal_core \
|
||||
-lmmal_util \
|
||||
-lmmal_vc_client \
|
||||
-lvdpau \
|
||||
-latomic
|
||||
}
|
||||
}
|
||||
|
||||
OTHER_FILES += \
|
||||
preBuild.sh \
|
||||
postLink.sh \
|
||||
|
|
Loading…
Add table
Reference in a new issue