mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refs #60
Added externals.pri looking for the external headers/libraries in 3 steps: 1. Manually set absolut path. Currently commented. Uncomment for local use. 2. Enviromental variable "VATSIM_EXTERNAL_DIR" 3. default path client/externals.
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,6 +21,10 @@ DebugFast/
|
||||
ReleaseDebugStatic/
|
||||
DebugFastStatic/
|
||||
build/
|
||||
Makefile
|
||||
|
||||
# Externals folder
|
||||
externals/
|
||||
|
||||
# .log files (usually created by QtTest - thanks to VestniK)
|
||||
*.log
|
||||
|
||||
1
.qmake.conf
Normal file
1
.qmake.conf
Normal file
@@ -0,0 +1 @@
|
||||
TOPSRCDIR=$$PWD
|
||||
@@ -2,6 +2,8 @@ TEMPLATE = subdirs
|
||||
|
||||
CONFIG += ordered
|
||||
|
||||
include (externals.pri)
|
||||
|
||||
WITH_BLACKMISC = ON
|
||||
WITH_BLACKCORE = ON
|
||||
WITH_BLACKD = ON
|
||||
@@ -16,7 +18,7 @@ WITH_SAMPLES = ON
|
||||
|
||||
equals(WITH_BLACKMISC, ON) {
|
||||
SUBDIRS += src/blackmisc
|
||||
SUBDIRS += src/blackmisc_cpp2xml
|
||||
#SUBDIRS += src/blackmisc_cpp2xml
|
||||
}
|
||||
|
||||
equals(WITH_BLACKCORE, ON) {
|
||||
|
||||
58
externals.pri
Normal file
58
externals.pri
Normal file
@@ -0,0 +1,58 @@
|
||||
# externals.pri
|
||||
# Sets up the include and library directories for external dependencies
|
||||
|
||||
# If you want to manually set the external path, uncomment the following line
|
||||
# EXTERNALDIR = /path/to/externals
|
||||
|
||||
# Test if enviromental variable for externals is set
|
||||
|
||||
isEmpty(EXTERNALDIR) {
|
||||
EXTERNALDIR = $$(VATSIM_EXTERNAL_DIR)
|
||||
message($$EXTERNALDIR)
|
||||
|
||||
}
|
||||
|
||||
# if no env variable is set, we use the standard path in the client folder.
|
||||
isEmpty(EXTERNALDIR) {
|
||||
EXTERNALDIR = $$TOPSRCDIR/externals
|
||||
message($$EXTERNALDIR)
|
||||
}
|
||||
|
||||
# Test the folder if it exists and has a include subfolder
|
||||
!exists("$$EXTERNALDIR/include") {
|
||||
error("Could not find externals in $$EXTERNALDIR. Please install it!")
|
||||
}
|
||||
|
||||
# Everything is fine. Add the include path
|
||||
message("Found externals: $$EXTERNALDIR")
|
||||
INCLUDEPATH *= $$EXTERNALDIR/include
|
||||
|
||||
# and the library path depending on the used compiler
|
||||
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64) {
|
||||
LIBS *= -L$$EXTERNALDIR/vs2010_64/lib
|
||||
}
|
||||
win32:contains(QMAKE_TARGET.arch, x86) {
|
||||
LIBS *= -L$$EXTERNALDIR/vs2010_32/lib
|
||||
}
|
||||
|
||||
win32-g++ {
|
||||
message("Can't figure out if MinGW version is 32 bit or 64.")
|
||||
message("Defaulting to 64 bit. If this is not correct, change the path manually!")
|
||||
LIBS *= -L$$EXTERNALDIR/mingw64/lib
|
||||
}
|
||||
|
||||
linux-g++-32 {
|
||||
LIBS *= -L$$EXTERNALDIR/linux32/lib
|
||||
}
|
||||
|
||||
linux-g++-64 {
|
||||
LIBS *= -L$$EXTERNALDIR/linux64/lib
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
include (../../externals.pri)
|
||||
|
||||
QT += core dbus
|
||||
QT -= gui
|
||||
|
||||
@@ -14,14 +16,12 @@ SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
LIBS += -L../../lib -lblackcore -lblackmisc
|
||||
LIBS += -L../../../vatlib -lvatlib
|
||||
LIBS += -lvatlib
|
||||
|
||||
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib \
|
||||
../../../vatlib/vatlib.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a \
|
||||
../../../vatlib/libvatlib.a
|
||||
#TODO standardize dependency locations
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
Reference in New Issue
Block a user