summaryrefslogtreecommitdiff
path: root/src/lib/lib.pro
blob: 27dee1c39624dc1bef917715b79febea002bc1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
QT = core script gui
all_tests:QT += testlib

TEMPLATE = lib
!isEmpty(QBS_DLLDESTDIR):DLLDESTDIR = $${QBS_DLLDESTDIR}
else:DLLDESTDIR = ../../bin
!isEmpty(QBS_DESTDIR):DESTDIR = $${QBS_DESTDIR}
else:DESTDIR = ../../lib
INCLUDEPATH += $$PWD
TARGET = qbscore

CONFIG += depend_includepath
DEFINES += QT_CREATOR QML_BUILD_STATIC_LIB      # needed for QmlJS

CONFIG(static, static|shared) {
    DEFINES += QBS_STATIC_LIB
} else {
    DEFINES += QBS_LIBRARY
}

DEFINES += SRCDIR=\\\"$$PWD\\\"
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols

win32:CONFIG(debug, debug|release):TARGET = $${TARGET}d
win32-msvc*|win32-icc:QMAKE_CXXFLAGS += /WX
else:*g++*|*clang*|*icc*:QMAKE_CXXFLAGS += -Werror

!disable_rpath {
    macx:QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
}

include(../../qbs_version.pri)
VERSION = $${QBS_VERSION}

include(api/api.pri)
include(buildgraph/buildgraph.pri)
include(jsextensions/jsextensions.pri)
include(language/language.pri)
include(logging/logging.pri)
include(parser/parser.pri)
include(tools/tools.pri)

HEADERS += \
    qbs.h

win32 {
    dlltarget.path = $${QBS_INSTALL_PREFIX}/bin
    INSTALLS += dlltarget
}

!win32|!qbs_no_dev_install {
    !isEmpty(QBS_LIB_INSTALL_DIR): \
        target.path = $${QBS_LIB_INSTALL_DIR}
    else: \
        target.path = $${QBS_INSTALL_PREFIX}/lib
    INSTALLS += target
}

!qbs_no_dev_install {
    qbs_h.files = qbs.h
    qbs_h.path = $${QBS_INSTALL_PREFIX}/include/qbs
    use_pri.files = use_installed.pri ../../qbs_version.pri
    use_pri.path = $${qbs_h.path}
    INSTALLS += qbs_h use_pri
}