1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
# QMake pro-file for the PokerTH dedicated server
isEmpty( PREFIX ){
PREFIX =/usr
}
TEMPLATE = app
CODECFORSRC = UTF-8
CONFIG += thread console embed_manifest_exe exceptions rtti stl warn_on
UI_DIR = uics
TARGET = bin/load
MOC_DIR = mocs
OBJECTS_DIR = obj
DEFINES += PREFIX=\"$${PREFIX}\"
QT -= core gui
#PRECOMPILED_HEADER = src/pch_lib.h
INCLUDEPATH += . \
src \
src/third_party/asn1
DEPENDPATH += . \
src \
src/third_party/asn1
# Input
HEADERS += \
src/game_defs.h
SOURCES += \
src/load.cpp
LIBS += -lpokerth_protocol
unix : !mac {
##### My release static build options
#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
#QMAKE_LFLAGS += -Wl,--gc-sections
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system($$QMAKE_QMAKE -query QT_INSTALL_LIBS)
BOOST_THREAD = boost_thread boost_thread-mt
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
BOOST_SYS = boost_system boost_system-mt
#
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system($$QMAKE_QMAKE -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
# variable to qmake.
#
for(dir, LIB_DIRS){
exists($$dir){
for(lib, BOOST_THREAD):exists($${dir}/lib$${lib}.so*) {
message("Found $$lib")
BOOST_THREAD = -l$$lib
}
for(lib, BOOST_THREAD):exists($${dir}/lib$${lib}.a) {
message("Found $$lib")
BOOST_THREAD = -l$$lib
}
for(lib, BOOST_PROGRAM_OPTIONS):exists($${dir}/lib$${lib}.so*) {
message("Found $$lib")
BOOST_PROGRAM_OPTIONS = -l$$lib
}
for(lib, BOOST_PROGRAM_OPTIONS):exists($${dir}/lib$${lib}.a) {
message("Found $$lib")
BOOST_PROGRAM_OPTIONS = -l$$lib
}
for(lib, BOOST_SYS):exists($${dir}/lib$${lib}.so*) {
message("Found $$lib")
BOOST_SYS = -l$$lib
}
for(lib, BOOST_SYS):exists($${dir}/lib$${lib}.a) {
message("Found $$lib")
BOOST_SYS = -l$$lib
}
}
}
BOOST_LIBS = $$BOOST_PROGRAM_OPTIONS $$BOOST_SYS $$BOOST_THREAD
!count(BOOST_LIBS, 3){
error("Unable to find boost libraries in PREFIX=$${PREFIX}")
}
UNAME = $$system(uname -s)
BSD = $$find(UNAME, "BSD")
kFreeBSD = $$find(UNAME, "kFreeBSD")
LIBS += $$BOOST_LIBS
LIBS += -lgsasl
POST_TARGETDEPS += ./lib/libpokerth_protocol.a
#### INSTALL ####
binary.path += $${PREFIX}/bin/
binary.files += load
INSTALLS += binary
}
|