Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit b2529df

Browse files
committed
Add support for PREFIX variable
1 parent b932444 commit b2529df

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ To link to your projects put this in your project's qmake project file
1919

2020
LIBS += -lqhttpserver
2121

22+
By default, the installation prefix is /usr/local. To change that to /usr,
23+
for example, run:
24+
25+
qmake -r PREFIX=/usr
26+
2227
Usage
2328
-----
2429

qhttpserver.pri

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
isEmpty(PREFIX):PREFIX = /usr/local
2+
isEmpty(LIBDIR):LIBDIR = $${PREFIX}/lib
3+
isEmpty(INCLUDEDIR):INCLUDEDIR = $${PREFIX}/include

src/src.pro

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include(../qhttpserver.pri)
12
QHTTPSERVER_BASE = ..
23
TEMPLATE = lib
34

@@ -22,5 +23,7 @@ OBJECTS_DIR = $$QHTTPSERVER_BASE/build
2223
MOC_DIR = $$QHTTPSERVER_BASE/build
2324
DESTDIR = $$QHTTPSERVER_BASE/lib
2425

25-
target.path = $$QHTTPSERVER_BASE/lib
26-
INSTALLS += target
26+
target.path = $$LIBDIR
27+
headers.path = $$INCLUDEDIR
28+
headers.files = $$PUBLIC_HEADERS
29+
INSTALLS += target headers

0 commit comments

Comments
 (0)