add boost_chrono, unless c++11

This commit is contained in:
Albert Medela
2017-04-15 23:17:53 +02:00
parent f3f31519d4
commit f8474c02f7
9 changed files with 93 additions and 5 deletions
Executable → Regular
View File
+27
View File
@@ -0,0 +1,27 @@
# QMake pro-file for PokerTH
!c++11 {
system( $$QMAKE_CXX -dumpversion | grep -e "^6.[0-9]" > /dev/null ) {
greaterThan(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 5) {
CONFIG += c++11
}
else {
equals(QT_MAJOR_VERSION, 4) : greaterThan(QT_MINOR_VERSION, 7) {
CONFIG += "c++11"
QMAKE_CXXFLAGS += "-std=gnu++11"
}
else {
error (QT must be greater and 4.8+)
}
}
}
}
c++11 {
!system( $$QMAKE_CXX -dumpversion | grep -e "^6.[0-9]" > /dev/null ) {
equals(QT_MAJOR_VERSION, 4) : greaterThan(QT_MINOR_VERSION, 7) {
QMAKE_CXXFLAGS += "-std=gnu++11"
message(here)
}
}
}
+3
View File
@@ -17,6 +17,9 @@ DEFINES += ENABLE_IPV6 TIXML_USE_STL
QT -= core gui
#PRECOMPILED_HEADER = src/pch_lib.h
# Check for c++11
include(pokerth_common.pro)
INCLUDEPATH += . \
src
+3
View File
@@ -14,6 +14,9 @@ OBJECTS_DIR = obj
QT -= core \
gui
# Check for c++11
include(pokerth_common.pro)
# PRECOMPILED_HEADER = dbofficial/pch_lib.h
INCLUDEPATH += . \
./src
+28 -1
View File
@@ -26,6 +26,9 @@ DEFINES += ENABLE_IPV6 TIXML_USE_STL BOOST_FILESYSTEM_DEPRECATED
DEFINES += PREFIX=\"$${PREFIX}\"
TARGET = pokerth
# Check for c++11
include(pokerth_common.pro)
# PRECOMPILED_HEADER = src/pch_game.h
android{
@@ -427,6 +430,8 @@ unix:!mac {
boost_system-mt
BOOST_RANDOM = boost_random \
boost_random-mt
BOOST_CHRONO = boost_chrono \
boost_chrono-mt
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
# to override the default '/usr' pass PREFIX
@@ -482,15 +487,37 @@ unix:!mac {
message("Found $$lib")
BOOST_SYS = -l$$lib
}
!c++11 {
for(lib, BOOST_CHRONO):exists($${dir}/lib$${lib}.so*) {
message("Found $$lib")
BOOST_CHRONO = -l$$lib
}
for(lib, BOOST_CHRONO):exists($${dir}/lib$${lib}.a) {
message("Found $$lib")
BOOST_CHRONO = -l$$lib
}
}
}
!android{
BOOST_LIBS = $$BOOST_THREAD \
c++11 {
BOOST_LIBS = $$BOOST_THREAD \
$$BOOST_FS \
$$BOOST_IOSTREAMS \
$$BOOST_REGEX \
$$BOOST_RANDOM \
$$BOOST_SYS
!count(BOOST_LIBS, 6):error("Unable to find boost libraries in PREFIX=$${PREFIX}")
}
!c++11 {
BOOST_LIBS = $$BOOST_THREAD \
$$BOOST_FS \
$$BOOST_IOSTREAMS \
$$BOOST_REGEX \
$$BOOST_RANDOM \
$$$$BOOST_SYS \
$$BOOST_CHRONO
!count(BOOST_LIBS, 7):error("Unable to find boost libraries in PREFIX=$${PREFIX}")
}
if($$system(sdl-config --version)):error("sdl-config not found in PATH - libSDL_mixer, libSDL are required!")
UNAME = $$system(uname -s)
BSD = $$find(UNAME, "BSD")
+3
View File
@@ -17,6 +17,9 @@ DEFINES += ENABLE_IPV6 TIXML_USE_STL BOOST_FILESYSTEM_DEPRECATED
QT -= core gui
#PRECOMPILED_HEADER = src/pch_lib.h
# Check for c++11
include(pokerth_common.pro)
INCLUDEPATH += . \
src \
src/engine \
+3
View File
@@ -17,6 +17,9 @@ QT -= core \
gui
# PRECOMPILED_HEADER = src/pch_lib.h
# Check for c++11
include(pokerth_common.pro)
INCLUDEPATH += . \
src
DEPENDPATH += . \
+25 -3
View File
@@ -19,6 +19,9 @@ DEFINES += PREFIX=\"$${PREFIX}\"
QT -= core gui
#PRECOMPILED_HEADER = src/pch_lib.h
# Check for c++11
include(pokerth_common.pro)
INCLUDEPATH += . \
src \
src/engine \
@@ -185,6 +188,7 @@ unix : !mac {
BOOST_SYS = boost_system boost_system-mt
BOOST_REGEX = boost_regex boost_regex-mt
BOOST_RANDOM = boost_random boost_random-mt
BOOST_CHRONO = boost_chrono boost_chrono-mt
#
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
@@ -249,11 +253,29 @@ unix : !mac {
message("Found $$lib")
BOOST_SYS = -l$$lib
}
!c++11 {
for(lib, BOOST_CHRONO):exists($${dir}/lib$${lib}.so*) {
message("Found $$lib")
BOOST_CHRONO = -l$$lib
}
for(lib, BOOST_CHRONO):exists($${dir}/lib$${lib}.a) {
message("Found $$lib")
BOOST_CHRONO = -l$$lib
}
}
}
}
BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS $$BOOST_REGEX $$BOOST_RANDOM $$BOOST_SYS
!count(BOOST_LIBS, 7){
error("Unable to find boost libraries in PREFIX=$${PREFIX}")
c++11 {
BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS $$BOOST_REGEX $$BOOST_RANDOM $$BOOST_SYS
!count(BOOST_LIBS, 7){
error("Unable to find boost libraries in PREFIX=$${PREFIX}")
}
}
!c++11 {
BOOST_LIBS = $$BOOST_THREAD $$BOOST_FS $$BOOST_PROGRAM_OPTIONS $$BOOST_IOSTREAMS $$BOOST_REGEX $$BOOST_RANDOM $$BOOST_SYS $$BOOST_CHRONO
!count(BOOST_LIBS, 8){
error("Unable to find boost libraries in PREFIX=$${PREFIX}")
}
}
UNAME = $$system(uname -s)
+1 -1
View File
@@ -46,7 +46,7 @@
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
#define POKERTH_BETA_REVISION 0
#define POKERTH_BETA_RELEASE_STRING "1.1.1"
#define POKERTH_BETA_RELEASE_STRING "1.1.2"
#define SQLITE_LOG_VERSION 1