Reorganized project to avoid the ".pro not found" by having all the
pro files in the same directory. With this change the android library now builds properly. This also fixes the parallel compilation problem that happened when building using +8 cores.
This commit is contained in:
63
config.pri
Normal file
63
config.pri
Normal file
@@ -0,0 +1,63 @@
|
||||
CXXFLAGS_WARNINGS = -Wall -Wextra -Wdisabled-optimization -Wformat=2 -Winit-self \
|
||||
-Wmissing-include-dirs -Woverloaded-virtual -Wundef -Wno-unused \
|
||||
-Wno-missing-field-initializers -Wno-format-nonliteral
|
||||
|
||||
# custom CXXFLAGS
|
||||
QMAKE_CXXFLAGS += -Wno-write-strings -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS $$CXXFLAGS_WARNINGS
|
||||
|
||||
QT_CONFIG -= no-pkg-config
|
||||
CONFIG += link_pkgconfig
|
||||
CONFIG -= debug_and_release
|
||||
|
||||
VERSION = 0.3.10
|
||||
|
||||
#Linux-only config
|
||||
unix:!macx {
|
||||
# largefile support
|
||||
DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE
|
||||
|
||||
# installation prefix
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr/local
|
||||
}
|
||||
|
||||
BINDIR = $$PREFIX/bin
|
||||
DATADIR = $$PREFIX/share
|
||||
MANDIR = $$DATADIR/man/man1
|
||||
}
|
||||
|
||||
# Windows config
|
||||
win32 {
|
||||
# avoid alignment issues with newer mingw compiler
|
||||
QMAKE_CXXFLAGS += -mno-ms-bitfields
|
||||
}
|
||||
|
||||
# OS X config
|
||||
macx {
|
||||
# OS X icon
|
||||
ICON = resources/images/qcma.icns
|
||||
# re-enable pkg-config on OS X (brew installs pkg-config files)
|
||||
QT_CONFIG -= no-pkg-config
|
||||
}
|
||||
|
||||
# try to get the current git version + hash
|
||||
QCMA_GIT_VERSION=$$system(git describe --tags)
|
||||
|
||||
#use the generic version if the above command fails (no git executable or metadata)
|
||||
isEmpty(QCMA_GIT_VERSION) {
|
||||
DEFINES += QCMA_VER=\\\"$$VERSION\\\"
|
||||
} else {
|
||||
DEFINES += QCMA_VER=\\\"$$QCMA_GIT_VERSION\\\"
|
||||
}
|
||||
|
||||
GET_HASHES {
|
||||
# try to get the current git commit and branch
|
||||
QCMA_GIT_HASH=$$system(git rev-parse --short HEAD)
|
||||
QCMA_GIT_BRANCH=$$system(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
# pass the current git commit hash
|
||||
!isEmpty(QCMA_GIT_HASH):!isEmpty(QCMA_GIT_BRANCH) {
|
||||
DEFINES += QCMA_BUILD_HASH=\\\"$$QCMA_GIT_HASH\\\"
|
||||
DEFINES += QCMA_BUILD_BRANCH=\\\"$$QCMA_GIT_BRANCH\\\"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user