Skip to content

Commit 726ab94

Browse files
author
Jordan
committed
Update plotline.sh to get script directory. Skip test dir for release build. Add lib directory correctly.
1 parent 31c28fd commit 726ab94

5 files changed

Lines changed: 22 additions & 20 deletions

File tree

Plotline.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ TEMPLATE = subdirs
77
CONFIG += ordered
88

99
SUBDIRS = src \
10-
test \
1110
doc
1211

12+
CONFIG(debug, debug|release): SUBDIRS += test
13+
1314
OTHER_FILES = \
1415
README.markdown
1516

packages/me.rngr.plotline/meta/package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<Description>
55
Application to create, manage, and publish a novel.
66
</Description>
7-
<Version>0.0.1</Version>
8-
<ReleaseDate>2016-02-23</ReleaseDate>
7+
<Version>1.0</Version>
8+
<ReleaseDate>2016-03-04</ReleaseDate>
99
<Name>me.rngr.plotline</Name>
1010
<Licenses>
1111
<License name="GPL v3" file="license.txt" />

plotline.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#!/bin/bash
22

3-
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:src/lib ./src/app/plotline
3+
# Thanks to https://stackoverflow.com/a/246128
4+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
6+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:src/lib $DIR/src/app/plotline

test/test.pro

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@
55
TEMPLATE = subdirs
66

77
SUBDIRS += \
8-
unit
8+
./unit
9+
10+
LIBS += -L$$OUT_PWD../../src/lib/libplotline.a
11+
12+
INCLUDEPATH += \
13+
$$PWD/../../src/lib
14+
15+
CONFIG += c++11

test/unit/unit.pro

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,17 @@ DISTFILES += \
3131
fixtures/revision-deserialize.json \
3232
fixtures/revision-bug-test.json
3333

34-
REQUIRES += \
35-
$$PWD/../../src/lib \
36-
$$PWD/../../src/app
37-
38-
INCLUDEPATH += \
39-
$$OUT_PWD/../../src/lib \
40-
$$OUT_PWD/../../src/app
41-
4234
##
4335
# Depending on whether we're building the libraries statically or dynamically,
4436
# Either the .so will be found or the .a will be found.
4537
# There is probably a more elegant solution.
4638
##
4739

48-
exists($$OUT_PWD/../../src/lib/libplotline.a){
49-
LIBS += $$OUT_PWD/../../src/lib/libplotline.a
50-
}
40+
CONFIG += console testcase c++11
5141

52-
exists($$OUT_PWD/../../src/lib/libplotline.so){
53-
LIBS += $$OUT_PWD/../../src/lib/libplotline.so
54-
}
42+
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../src/lib/release/ -lplotline
43+
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../src/lib/debug/ -lplotline
44+
else:unix: LIBS += -L$$OUT_PWD/../../src/lib/ -lplotline
5545

56-
CONFIG += console testcase c++11
46+
INCLUDEPATH += $$PWD/../../src/lib
47+
DEPENDPATH += $$PWD/../../src/lib

0 commit comments

Comments
 (0)