Moving db stuff to a separate lib due to dependency trouble with ld.
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
# QMake pro-file for PokerTH
|
||||
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = pokerth_protocol.pro pokerth_lib.pro pokerth_game.pro pokerth_server.pro chatcleaner.pro
|
||||
SUBDIRS = pokerth_protocol.pro pokerth_db.pro pokerth_lib.pro pokerth_game.pro pokerth_server.pro chatcleaner.pro
|
||||
CONFIG += ordered
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# QMake pro-file for PokerTH common library
|
||||
|
||||
TEMPLATE = lib
|
||||
CODECFORSRC = UTF-8
|
||||
|
||||
CONFIG += staticlib thread exceptions rtti stl warn_on
|
||||
UI_DIR = uics
|
||||
TARGET = lib/pokerth_db
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = obj
|
||||
DEFINES += ENABLE_IPV6
|
||||
QT -= core gui
|
||||
#PRECOMPILED_HEADER = src/pch_lib.h
|
||||
|
||||
INCLUDEPATH += . \
|
||||
src
|
||||
|
||||
DEPENDPATH += . \
|
||||
src
|
||||
|
||||
# Input
|
||||
HEADERS += \
|
||||
src/db/serverdbcallback.h \
|
||||
src/db/serverdbfactory.h \
|
||||
src/db/serverdbinterface.h \
|
||||
src/db/serverdbgeneric.h \
|
||||
src/db/serverdbfactorygeneric.h
|
||||
|
||||
SOURCES += \
|
||||
src/db/common/serverdbcallback.cpp \
|
||||
src/db/common/serverdbfactory.cpp \
|
||||
src/db/common/serverdbinterface.cpp \
|
||||
src/db/common/serverdbgeneric.cpp \
|
||||
src/db/common/serverdbfactorygeneric.cpp
|
||||
|
||||
win32{
|
||||
DEFINES += CURL_STATICLIB
|
||||
DEFINES += _WIN32_WINNT=0x0501
|
||||
DEPENDPATH += src/net/win32/ src/core/win32
|
||||
INCLUDEPATH += ../boost/ ../GnuTLS/include ../curl/include ../zlib
|
||||
}
|
||||
!win32{
|
||||
##### My release static build options
|
||||
#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
}
|
||||
|
||||
mac{
|
||||
# make it universal
|
||||
CONFIG += x86
|
||||
CONFIG -= ppc
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
|
||||
|
||||
# for universal-compilation on PPC-Mac uncomment the following line
|
||||
# on Intel-Mac you have to comment this line out or build will fail.
|
||||
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
|
||||
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.5.sdk/usr/include/
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
}
|
||||
+6
-4
@@ -302,6 +302,7 @@ win32 {
|
||||
../curl/lib \
|
||||
../zlib
|
||||
LIBS += -lpokerth_lib \
|
||||
-lpokerth_db \
|
||||
-lpokerth_protocol
|
||||
win32-msvc2005 {
|
||||
LIBPATH += Release/lib \
|
||||
@@ -354,8 +355,6 @@ win32 {
|
||||
-lwldap32
|
||||
RC_FILE = pokerth.rc
|
||||
}
|
||||
!win32:DEPENDPATH += src/net/linux/ \
|
||||
src/core/linux
|
||||
unix:# workaround for problems with boost_filesystem exceptions
|
||||
QMAKE_LFLAGS += -no_dead_strip_inits_and_terms
|
||||
unix:!mac {
|
||||
@@ -404,7 +403,8 @@ unix:!mac {
|
||||
UNAME = $$system(uname -s)
|
||||
BSD = $$find(UNAME, "BSD")
|
||||
kFreeBSD = $$find(UNAME, "kFreeBSD")
|
||||
LIBS += -lpokerth_lib \
|
||||
LIBS += -lpokerth_lib \
|
||||
-lpokerth_db \
|
||||
-lpokerth_protocol
|
||||
LIBS += $$BOOST_LIBS
|
||||
LIBS += -lSDL_mixer \
|
||||
@@ -413,6 +413,7 @@ unix:!mac {
|
||||
else:LIBS += -lgnutls-openssl \
|
||||
-lgcrypt
|
||||
TARGETDEPS += ./lib/libpokerth_lib.a \
|
||||
./lib/libpokerth_db.a \
|
||||
./lib/libpokerth_protocol.a
|
||||
|
||||
# #### My release static libs
|
||||
@@ -442,7 +443,8 @@ mac {
|
||||
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
|
||||
LIBPATH += lib
|
||||
LIBS += -lpokerth_lib \
|
||||
-lpokerth_protocol
|
||||
-lpokerth_db \
|
||||
-lpokerth_protocol
|
||||
|
||||
# QT dynamic linked framework (see also mac_post_make.sh)
|
||||
LIBS += -framework \
|
||||
|
||||
@@ -210,11 +210,6 @@ SOURCES += \
|
||||
src/net/common/uploadhelper.cpp \
|
||||
src/net/common/encodedpacket.cpp \
|
||||
src/net/common/internalchatcleanerpacket.cpp \
|
||||
src/db/common/serverdbcallback.cpp \
|
||||
src/db/common/serverdbfactory.cpp \
|
||||
src/db/common/serverdbinterface.cpp \
|
||||
src/db/common/serverdbgeneric.cpp \
|
||||
src/db/common/serverdbfactorygeneric.cpp \
|
||||
src/gui/generic/serverguiwrapper.cpp \
|
||||
src/gui/qttoolsinterface.cpp
|
||||
|
||||
@@ -232,8 +227,6 @@ win32{
|
||||
!win32{
|
||||
##### My release static build options
|
||||
#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
|
||||
DEPENDPATH += src/net/linux/ src/core/linux
|
||||
}
|
||||
|
||||
mac{
|
||||
|
||||
+10
-8
@@ -121,7 +121,7 @@ win32 {
|
||||
|
||||
LIBPATH += ../boost/stage/lib ../GnuTLS/lib ../curl/lib ../zlib
|
||||
|
||||
LIBS += -lpokerth_lib -lpokerth_protocol
|
||||
LIBS += -lpokerth_lib -lpokerth_db -lpokerth_protocol
|
||||
|
||||
win32-msvc2005 {
|
||||
LIBPATH += Release/lib
|
||||
@@ -241,6 +241,7 @@ unix : !mac {
|
||||
kFreeBSD = $$find(UNAME, "kFreeBSD")
|
||||
|
||||
LIBS += -lpokerth_lib \
|
||||
-lpokerth_db \
|
||||
-lpokerth_protocol
|
||||
LIBS += $$BOOST_LIBS
|
||||
LIBS += -lcurl
|
||||
@@ -251,6 +252,7 @@ unix : !mac {
|
||||
}
|
||||
|
||||
TARGETDEPS += ./lib/libpokerth_lib.a \
|
||||
./lib/libpokerth_db.a \
|
||||
./lib/libpokerth_protocol.a
|
||||
|
||||
#### INSTALL ####
|
||||
@@ -261,12 +263,6 @@ unix : !mac {
|
||||
INSTALLS += binary
|
||||
}
|
||||
|
||||
official_server {
|
||||
LIBPATH += pkth_stat/daemon_lib/lib
|
||||
LIBS += -lpokerth_closed -lpokerth_lib -lmysqlpp
|
||||
DEFINES += POKERTH_OFFICIAL_SERVER
|
||||
}
|
||||
|
||||
mac {
|
||||
# make it universal
|
||||
CONFIG += x86
|
||||
@@ -278,7 +274,7 @@ mac {
|
||||
# QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
|
||||
|
||||
LIBPATH += lib
|
||||
LIBS += -lpokerth_lib -lpokerth_protocol
|
||||
LIBS += -lpokerth_lib -lpokerth_db -lpokerth_protocol
|
||||
# standard path for darwinports
|
||||
# make sure you have a universal version of boost
|
||||
LIBS += /usr/local/lib/libboost_thread.a
|
||||
@@ -294,3 +290,9 @@ mac {
|
||||
LIBPATH += /Developer/SDKs/MacOSX10.5.sdk/usr/lib
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.5.sdk/usr/include/
|
||||
}
|
||||
|
||||
official_server {
|
||||
LIBPATH += pkth_stat/daemon_lib/lib
|
||||
LIBS += -lpokerth_closed -lmysqlpp
|
||||
DEFINES += POKERTH_OFFICIAL_SERVER
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user