From 1804ac7ceabcf99182c47b840dcba18b20f8746d Mon Sep 17 00:00:00 2001 From: tkawata Date: Sat, 28 Apr 2012 21:00:49 +0900 Subject: [PATCH] Refactored the project files and the file structure. --- Source/Source.pro | 27 +++++++++++++++++---------- Thirdparty/README.txt | 5 ++--- dennco.pro | 6 +++++- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Source/Source.pro b/Source/Source.pro index aa74247..eb737d0 100644 --- a/Source/Source.pro +++ b/Source/Source.pro @@ -9,8 +9,9 @@ QT += core gui webkit script xml sql TARGET = QtDennco TEMPLATE = app +DESTDIR = ../bin -INCLUDEPATH += QtScript QtDennco platform/qt ../Thirdparty/serialport/include +INCLUDEPATH += QtScript QtDennco platform/qt ../Thirdparty/qt/qserialdevice-qserialdevice/include SOURCES += QtDennco/mainwindow.cpp \ QtDennco/main.cpp \ @@ -127,17 +128,23 @@ HEADERS += QtDennco/mainwindow.h \ FORMS += QtDennco/mainwindow.ui FORMS += QtDennco/portinfodialog.ui -Debug:DEFINES+=DEBUG -Debug{ - LIBS += -L"../Thirdparty/serialport/src/debug" -lSerialPort - win32:QMAKE_POST_LINK = "copy ..\\Thirdparty\\serialport\\src\\debug\\SerialPort.dll debug" - unix:QMAKE_POST_LINK = "cp ../Thirdparty/serialport/src/debug/SerialPort.so debug" +CONFIG(debug,debug|release) { + DEFINES+=DEBUG + win32:LIBS += -L"../Thirdparty/qt/qserialdevice-qserialdevice/src/debug" -lSerialPort + unix:LIBS += -L"../Thirdparty/qt/qserialdevice-qserialdevice/src" -lSerialPort + +} else { + win32:LIBS += -L"../Thirdparty/qt/qserialdevice-qserialdevice/src/release" -lSerialPort + unix:LIBS += -L"../Thirdparty/qt/qserialdevice-qserialdevice/src" -lSerialPort } -Release{ - LIBS += -L"../Thirdparty/serialport/src/release" -lSerialPort - win32:QMAKE_POST_LINK = "copy ..\\Thirdparty\\serialport\\src\\release\\SerialPort.dll release" - unix:QMAKE_POST_LINK = "cp ../Thirdparty/serialport/src/release/SerialPort.so release" +CONFIG(debug,debug|release) { + win32:QMAKE_POST_LINK = "copy ..\\Thirdparty\\qt\\qserialdevice-qserialdevice\\src\\debug\\SerialPort.dll ..\\bin" + unix:QMAKE_POST_LINK = "cp ../Thirdparty/qt/qserialdevice-qserialdevice/src/libSerialPort.so ../bin" + +} else { + win32:QMAKE_POST_LINK = "copy ..\\Thirdparty\\qt\\qserialdevice-qserialdevice\\src\\release\\SerialPort.dll ..\\bin" + unix:QMAKE_POST_LINK = "cp ../Thirdparty/qt/qserialdevice-qserialdevice/src/libSerialPort.so ../bin" } diff --git a/Thirdparty/README.txt b/Thirdparty/README.txt index fe4db32..0ae2091 100644 --- a/Thirdparty/README.txt +++ b/Thirdparty/README.txt @@ -3,9 +3,8 @@ This is the directory for storing thirdparty files. Please get following thirdparty files and put here. - QSerialDevice 2.0 - Download QSerialDevice 2.0 from http://gitorious.org/qserialdevice/qserialdevice/trees/2.0 and deploy under this directory. - Rename the top directory of the thirdparty file to serialport. - The top directory for this thirdparty file will be "Thirdparty/serialport". + Download QSerialDevice 2.0 from http://gitorious.org/qserialdevice/qserialdevice/trees/2.0 and deploy under Thirdparty/qt directory. + The top directory for this thirdparty file will be "Thirdparty/qt/qserialdevice-qserialdevice". MEMO: If you develop on windows and use QtSDK with default configuration, you may encounter a build error diff --git a/dennco.pro b/dennco.pro index ffd4637..39d1e79 100644 --- a/dennco.pro +++ b/dennco.pro @@ -7,4 +7,8 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS+=Thirdparty/serialport Source +SUBDIRS+= serialport Source + +serialport.file = Thirdparty/qt/qserialdevice-qserialdevice/serialport.pro + +DESTDIR = bin -- 2.11.0