From e7bfaeff9aad7e64039f7967084c34f22dbb8498 Mon Sep 17 00:00:00 2001 From: Eelke Klein Date: Sun, 24 Mar 2019 08:53:22 +0100 Subject: [PATCH] project file cleanup Moving system dependent parts into local.pri which is not tracked and supply local.pri.sample as a template for developers to adjust for their local system. --- .gitignore | 2 +- common.pri | 7 +++++-- core/core.pro | 2 +- ctk/ctk.pro | 10 +--------- local.pri.sample | 17 +++++++++++++++++ pglab/pglab.pro | 5 ----- pgsql/pgsql.pro | 2 +- tests/PgsqlTests/PgsqlTests.pro | 2 +- tests/pglabtests/pglabtests.pro | 12 ++++-------- 9 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 local.pri.sample diff --git a/.gitignore b/.gitignore index 010f368..9875eb8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ build/* *.kdev4 .kdev4/* - +local.pri DIST/ *.autosave srcdoc/ diff --git a/common.pri b/common.pri index aa6728e..3232773 100644 --- a/common.pri +++ b/common.pri @@ -1,7 +1,10 @@ -INCLUDEPATH += C:\prog\include C:\prog\include\pgsql C:\VSproj\boost\include\boost-1_68 +! include( ./local.pri ) { +error( "Use local.pri.sample to create your own local.pri" ) +} -LIBS += -LC:\VSproj\boost\lib -LC:/PROG/LIB -lws2_32 -llibpq +LIBS += -lws2_32 -llibpq +CONFIG += c++17 QMAKE_CXXFLAGS += /std:c++17 # The following define makes your compiler emit warnings if you use diff --git a/core/core.pro b/core/core.pro index 2289bec..7b66672 100644 --- a/core/core.pro +++ b/core/core.pro @@ -9,7 +9,7 @@ QT += sql TARGET = core TEMPLATE = lib -CONFIG += staticlib c++17 +CONFIG += staticlib ! include( ../common.pri ) { error( "Couldn't find the common.pri file!" ) diff --git a/ctk/ctk.pro b/ctk/ctk.pro index 6e42fbb..5e69716 100644 --- a/ctk/ctk.pro +++ b/ctk/ctk.pro @@ -8,15 +8,7 @@ QT += widgets TARGET = ctk TEMPLATE = lib -CONFIG += staticlib c++14 - -QMAKE_CXXFLAGS += /std:c++17 - -INCLUDEPATH += C:\prog\include \ -C:\Prog\include\pgsql \ -C:\VSproj\boost32\include - -DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX +CONFIG += staticlib # The following define makes your compiler emit warnings if you use diff --git a/local.pri.sample b/local.pri.sample new file mode 100644 index 0000000..44b8f1e --- /dev/null +++ b/local.pri.sample @@ -0,0 +1,17 @@ +# Need paths here to find following library headers +# - botan +# - boost +# - libpq +# ??? +INCLUDEPATH += c:/prog/include +INCLUDEPATH += c:/prog/include/pgsql +INCLUDEPATH += c:/VSproj/boost/include/boost-1_68 + +# Need paths here to find library files for +# - botan +# - boost +# - libpq +# +LIBS += -L\VSproj\boost\lib -L/PROG/LIB + +GOOGLETEST_DIR = c:/prog/googletest diff --git a/pglab/pglab.pro b/pglab/pglab.pro index 478e312..4317378 100644 --- a/pglab/pglab.pro +++ b/pglab/pglab.pro @@ -4,7 +4,6 @@ # #------------------------------------------------- -CONFIG += c++17 QT += core gui concurrent greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql @@ -17,11 +16,7 @@ TEMPLATE = app error( "Couldn't find the common.pri file!" ) } -INCLUDEPATH += C:\Prog\include\pgsql DEFINES += _WIN32_WINNT=0x0501 -#LIBS += -LC:/prog/boost/lib -Lc:/prog/lib libpq.lib fmt.lib User32.lib ws2_32.lib -#LIBS += -LC:\VSproj\boost32\lib -LC:/PROG/LIB -lws2_32 -llibpq - win32:RC_ICONS += pglab.ico diff --git a/pgsql/pgsql.pro b/pgsql/pgsql.pro index d603ae6..e036edd 100644 --- a/pgsql/pgsql.pro +++ b/pgsql/pgsql.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -CONFIG += staticlib c++17 +CONFIG += staticlib QT += core greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql diff --git a/tests/PgsqlTests/PgsqlTests.pro b/tests/PgsqlTests/PgsqlTests.pro index 3136f67..28bf378 100644 --- a/tests/PgsqlTests/PgsqlTests.pro +++ b/tests/PgsqlTests/PgsqlTests.pro @@ -4,7 +4,7 @@ error( "Couldn't find the common.pri file!" ) include(gtest_dependency.pri) TEMPLATE = app -CONFIG += console c++17 +CONFIG += console CONFIG -= app_bundle CONFIG += thread CONFIG += qt diff --git a/tests/pglabtests/pglabtests.pro b/tests/pglabtests/pglabtests.pro index 004c52b..646d1b0 100644 --- a/tests/pglabtests/pglabtests.pro +++ b/tests/pglabtests/pglabtests.pro @@ -1,20 +1,16 @@ +! include( ../../common.pri ) { +error( "Couldn't find the common.pri file!" ) +} include(gtest_dependency.pri) TEMPLATE = app -CONFIG += console c++17 +CONFIG += console CONFIG -= app_bundle CONFIG += thread CONFIG += qt QT += core widgets -QMAKE_CXXFLAGS += /std:c++17 - -! include( ../../common.pri ) { -error( "Couldn't find the common.pri file!" ) -} - - HEADERS += SOURCES += main.cpp \