Skip to content

Commit

Permalink
[#issue-27] add a dedicated conf file, and use absolute paths from so…
Browse files Browse the repository at this point in the history
…urce and build dir
  • Loading branch information
iffyuva committed Jul 26, 2014
1 parent 53ab788 commit 9ddc912
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .qmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RC_ROOT_SOURCE_DIR = $$PWD
RC_ROOT_BUILD_DIR = $$shadowed($$PWD)
11 changes: 7 additions & 4 deletions client/client.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ SOURCES += main.cpp


# Include rbkit lib via pri file
include(../rbkit/rbkit.pri)
include($$RC_ROOT_SOURCE_DIR/rbkit/rbkit.pri)

# Include msgpack via pri file
include(../msgpack.pri)
include($$RC_ROOT_SOURCE_DIR/msgpack.pri)

# Include nzmqt via pri file
# include(../nzmqt/nzmqt.pri)
include($$RC_ROOT_SOURCE_DIR/nzmqt/nzmqt.pri)

# Include zeromq via pri file
include(../zeromq.pri)
include($$RC_ROOT_SOURCE_DIR/zeromq.pri)

# Include zeromq via pri file
include($$RC_ROOT_SOURCE_DIR/web/web.pri)
7 changes: 2 additions & 5 deletions msgpack-c/msgpack-c.pro
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
RBKIT_BUILD_ROOT = $$OUT_PWD/..
RBKIT_SRC_ROOT = $$PWD/..

MAKEFILE = Makefile.msgpack

Makefile.target = Makefile
Makefile.commands = $$PWD/configure --prefix=$${RBKIT_BUILD_ROOT}/msgpack
Makefile.commands = $$PWD/configure --prefix=$$RC_ROOT_BUILD_DIR/msgpack

all.commands = make && make install
all.depends = Makefile
all.CONFIG = phony

TARGET = $${RBKIT_BUILD_ROOT}/msgpack/lib/libmsgpack.a
TARGET = $$RC_ROOT_BUILD_DIR/msgpack/lib/libmsgpack.a
TEMPLATE = lib

QMAKE_DISTCLEAN += Makefile
Expand Down
11 changes: 4 additions & 7 deletions rbkit/rbkit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
VERSION = 0.0.0.pre
TARGET = rbkit
TEMPLATE = lib
RBKIT_ROOT = $$PWD/..

CONFIG += staticlib

Expand All @@ -20,17 +19,15 @@ HEADERS += \
askhost.h

# Include msgpack via pri file
include(../msgpack.pri)
include($$RC_ROOT_SOURCE_DIR/msgpack.pri)

# Include nzmqt via pri file
include(../nzmqt/nzmqt.pri)
include($$RC_ROOT_SOURCE_DIR/nzmqt/nzmqt.pri)

# Include zeromq via pri file
include(../zeromq.pri)
include($$RC_ROOT_SOURCE_DIR/zeromq.pri)


FORMS += \
rbkitmainwindow.ui \
askhost.ui

RESOURCES += \
rbkit.qrc
12 changes: 0 additions & 12 deletions rbkit/rbkit.qrc

This file was deleted.

1 change: 1 addition & 0 deletions rbkit/subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@ void Subscriber::onMessageReceived(const QList<QByteArray>& rawMessage)

void Subscriber::onTimerExpiry()
{
qDebug() << m_type2Count;
emit messageReady(m_type2Count);
}
10 changes: 5 additions & 5 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<html>
<head>
<title> Realtime Graphs </title>
<script type="text/javascript" src="qrc:/web/web/lib/jquery.js"></script>
<script type="text/javascript" src="qrc:/web/web/lib/highchart.js"></script>
<script type="text/javascript" src="qrc:/web/web/lib/underscore.js"></script>
<script type="text/javascript" src="qrc:/web/web/src/objectcount.js"></script>
<script type="text/javascript" src="qrc:/web/lib/jquery.js"></script>
<script type="text/javascript" src="qrc:/web/lib/highchart.js"></script>
<script type="text/javascript" src="qrc:/web/lib/underscore.js"></script>
<script type="text/javascript" src="qrc:/web/src/objectcount.js"></script>
</head>
<body>
<div id="container" style="width:100%; height:400px;"></div>
<script type="text/javascript" src="qrc:/web/web/src/chart.js"></script>
<script type="text/javascript" src="qrc:/web/src/chart.js"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions web/web.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://danny-pope.com/?p=86

COFFEESCRIPT_FILES += $$PWD/src/*.coffee

# Define the compiler. The actual compilation is done in the 'commands' section.
CoffeeMaker.input = COFFEESCRIPT_FILES
CoffeeMaker.targetdir = $$PWD/src
CoffeeMaker.output = $$CoffeeScriptCompiler.targetdir\${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
CoffeeMaker.commands = coffee --bare --compile --output $$PWD/src $$PWD/src
CoffeeMaker.CONFIG += no_link_no_clean
CoffeeMaker.variable_out = PRE_TARGETDEPS

# Add the compiler to the list of 'extra compilers'.
QMAKE_EXTRA_COMPILERS += CoffeeMaker

RESOURCES += $$PWD/web.qrc
12 changes: 12 additions & 0 deletions web/web.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<RCC>
<qresource prefix="/web">
<file>src/chart.js</file>
<file>lib/highchart.js</file>
<file>index.html</file>
<file>lib/jquery.js</file>
<file>src/chart.coffee</file>
<file>lib/underscore.js</file>
<file>src/objectcount.coffee</file>
<file>src/objectcount.js</file>
</qresource>
</RCC>
7 changes: 2 additions & 5 deletions zeromq-4.0.4/zeromq-4.0.4.pro
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
RBKIT_BUILD_ROOT = $$OUT_PWD/..
RBKIT_SRC_ROOT = $$PWD/..

MAKEFILE = Makefile.zeromq

Makefile.target = Makefile
Makefile.commands = $$PWD/configure --prefix=$${RBKIT_BUILD_ROOT}/zeromq
Makefile.commands = $$PWD/configure --prefix=$$RC_ROOT_BUILD_DIR/zeromq

all.commands = make && make install
all.depends = Makefile
all.CONFIG = phony

TARGET = $${RBKIT_BUILD_ROOT}/zeromq/lib/zeromq.a
TARGET = $$RC_ROOT_BUILD_DIR/zeromq/lib/zeromq.a
TEMPLATE = lib

QMAKE_DISTCLEAN += Makefile
Expand Down

0 comments on commit 9ddc912

Please sign in to comment.