diff --git a/3rdparty/kdiff3/kdiff3.pro b/3rdparty/kdiff3/kdiff3.pro index 15e9f9cd..94b73411 100755 --- a/3rdparty/kdiff3/kdiff3.pro +++ b/3rdparty/kdiff3/kdiff3.pro @@ -7,7 +7,7 @@ CONFIG += staticlib include(../../common.pri) QT *= widgets -# QTextCodec QRegExp in Qt6 +# QTextCodec in Qt6 greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat SOURCES += \ diff --git a/common.pri b/common.pri index 3cd122a3..2bbb1b7b 100644 --- a/common.pri +++ b/common.pri @@ -1,7 +1,6 @@ PROJECT_ROOT_PATH = $${PWD} -PROJECT_BUILD_PATH = $$shadowed($$PROJECT_ROOT_PATH) CONFIG(debug, debug|release) { BUILD_FLAG = debug @@ -22,24 +21,53 @@ LANG_PATH = $${PROJECT_ROOT_PATH}/lang # define locales for translation LANG_LIST = pl ca de fi cs_CZ es nl ru -LIBS_PATH = $${PROJECT_BUILD_PATH}/libs -BIN_PATH = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG} - -DESTDIR = $${BIN_PATH} -CONFIG(staticlib) { - DESTDIR = $$LIBS_PATH +!CONFIG(staticlib) { + DESTDIR = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG} } -LIBS += -L$${LIBS_PATH} -L$${BIN_PATH} -INCLUDEPATH += $${PROJECT_ROOT_PATH}/include -INCLUDEPATH += $${PROJECT_ROOT_PATH}/3rdparty -INCLUDEPATH += $${PROJECT_ROOT_PATH}/3rdparty/include - !defined(PREFIX, var) { unix:PREFIX = /usr/local/ win32:PREFIX = $$(programfiles) } +#------------------# +# Link modules # +#------------------# + +contains(MODULES, kdiff3) { + INCLUDEPATH += $${PROJECT_ROOT_PATH}/3rdparty + LIBS += -L$$shadowed($${PROJECT_ROOT_PATH}/3rdparty/kdiff3) + LIBS += -lkdiff3 + # QTextCodec in Qt6 + greaterThan(QT_MAJOR_VERSION, 5): QT *= core5compat +} + +contains(MODULES, qtsingleapplication) { + INCLUDEPATH += $${PROJECT_ROOT_PATH}/3rdparty/include + LIBS += -L$$shadowed($${PROJECT_ROOT_PATH}/3rdparty/qtsingleapplication) + LIBS += -lqtsingleapplication +} + +contains(MODULES, edytornc-common) { + INCLUDEPATH += $${PROJECT_ROOT_PATH}/src-common \ + $${PROJECT_ROOT_PATH}/src-common/include \ + $$shadowed($${PROJECT_ROOT_PATH}/src-common) + LIBS += -L$$shadowed($${PROJECT_ROOT_PATH}/src-common) + LIBS += -ledytornc-common +} + +contains(MODULES, edytornc) { + INCLUDEPATH += $${PROJECT_ROOT_PATH}/src/include +# LIBS += -L$$shadowed($${PROJECT_ROOT_PATH}/src) +# LIBS += -ledytornc +} + +contains(MODULES, sfs) { + INCLUDEPATH += $${PROJECT_ROOT_PATH}/sfs +# LIBS += -L$$shadowed($${PROJECT_ROOT_PATH}/sfs) +# LIBS += -lsfs +} + # # function findFiles(dir, basename) diff --git a/sfs/sfs.pro b/sfs/sfs.pro index c40a96a5..ee1b2fbe 100644 --- a/sfs/sfs.pro +++ b/sfs/sfs.pro @@ -6,11 +6,9 @@ TARGET = sfs include(../common.pri) QT *= widgets serialport network -# QTextCodec QRegExp uses in kdiff3. In Qt6 need add core5compat -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat +MODULES *= kdiff3 qtsingleapplication edytornc-common -INCLUDEPATH += ../src-common ../src-common/include/ $$shadowed(../src-common) -LIBS += -lkdiff3 -lqtsingleapplication -ledytornc-common +include(../common.pri) #EdytorNC - SFS diff --git a/src-common/src-common.pro b/src-common/src-common.pro index 9c3ed055..3e0332b6 100644 --- a/src-common/src-common.pro +++ b/src-common/src-common.pro @@ -4,10 +4,10 @@ TEMPLATE = lib TARGET = edytornc-common CONFIG += staticlib -include(../common.pri) - QT *= widgets serialport network +include(../common.pri) + INCLUDEPATH += include #EdytorNC common diff --git a/src/src.pro b/src/src.pro index 4fd04a5b..7128e0a5 100644 --- a/src/src.pro +++ b/src/src.pro @@ -3,14 +3,12 @@ VERSION = 2018.07 TEMPLATE = app TARGET = edytornc -include(../common.pri) - QT *= widgets printsupport serialport network -# QTextCodec QRegExp uses in kdiff3. In Qt6 need add core5compat -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat +MODULES *= kdiff3 qtsingleapplication edytornc-common sfs + +include(../common.pri) -INCLUDEPATH += include ../src-common ../src-common/include/ $$shadowed(../src-common) ../sfs -LIBS += -lkdiff3 -lqtsingleapplication -ledytornc-common +INCLUDEPATH += include #EdytorNC