[Qt-interest] questions about pro file
Vincent Cai
wcai at cypress.com
Mon Oct 31 02:23:26 CET 2011
Dear all,
I have figured out the root cause which is due to the wrong syntax.
According to the qmake manual, the correct syntax should be:
Scopes consist of a condition followed by an opening brace on the same line, a sequence of commands and definitions, and a closing brace on a new line:
<condition> {
<command or definition>
...
}
FYI,
Vincent.
From: qt-interest-bounces+wcai=cypress.com at qt.nokia.com [mailto:qt-interest-bounces+wcai=cypress.com at qt.nokia.com] On Behalf Of Vincent Cai
Sent: 2011年10月29日 14:22
To: Qt-interest
Subject: [Qt-interest] questions about pro file
Hi,
I am trying to modify the *.pro file to support generating output file in specified directory automatically.
l Debug
n Application
u $$PWD/build/debug/exe
n Library
u Static
l $$PWD/build /debug/lib
u Dll
l $$PWD/build /debug/dll
l Release
n Application
u $$PWD/build /release/exe
n Library
u Static
l $$PWD/build /release /lib
u Dll
n $$PWD/build /release /dll
Below is my pro file, but it can’t work properly, could anybody help?
TEMPLATE = lib
CONFIG += staticlib
CONFIG -= dll
QT -= gui
OBJECTS_DIR = build/obj
MOC_DIR = build/moc
contains(TEMPLATE, lib)
{
contains(CONFIG, dll)
{
OUTPUT_DIR = DLL
} else {
OUTPUT_DIR = LIB
}
} else {
OUTPUT_DIR = EXE
}
message(OUTPUT_DIR=$$OUTPUT_DIR)
CONFIG (debug, debug|release)
{
BUILD_DIR = DEBUG
} else {
BUILD_DIR = RELEASE
}
message(BUILD_DIR=$$BUILD_DIR)
message(CONFIG=$$CONFIG)
APP_PATH = ../APP
TEMPLATE += fakelib
TARGET_NAME = $$qtLibraryTarget(qserialdevice)
TEMPLATE -= fakelib
DLLDESTDIR = $$APP_PATH/$$BUILD_DIR/$$OUTPUT_DIR
DESTDIR = build/$$BUILD_DIR/$$OUTPUT_DIR
TARGET = $$TARGET_NAME
message(DLLDESTDIR=$$DLLDESTDIR)
message(DESTDIR=$$DESTDIR)
message(TARGET=$$TARGET)
HEADERS += \
test.h
SOURCES += \
test.cpp
Thanks
Vincent.
________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111030/c36793df/attachment.html
More information about the Qt-interest-old
mailing list