qtcreatorplugin.pri 1.5 KB
Newer Older
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
1
include(../qtcreator.pri)
con's avatar
con committed
2 3 4 5 6

isEmpty(PROVIDER) {
    PROVIDER = Nokia
}

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
7
DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER
con's avatar
con committed
8 9 10 11 12 13
LIBS += -L$$DESTDIR
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins
DEPENDPATH += $$IDE_SOURCE_TREE/src/plugins

# copy the plugin spec
isEmpty(TARGET) {
14
    error("qtcreatorplugin.pri: You must provide a TARGET")
con's avatar
con committed
15 16
}

17 18 19 20 21 22 23 24
PLUGINSPECS = $${_PRO_FILE_PWD_}/$${TARGET}.pluginspec
copy2build.input = PLUGINSPECS
copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += copy2build
con's avatar
con committed
25 26 27 28 29 30 31

TARGET = $$qtLibraryTarget($$TARGET)

macx {
        QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/
} else:linux-* {
    #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
32
    QMAKE_RPATHDIR += \$\$ORIGIN
con's avatar
con committed
33
    QMAKE_RPATHDIR += \$\$ORIGIN/..
34
    QMAKE_RPATHDIR += \$\$ORIGIN/../..
con's avatar
con committed
35 36 37 38 39 40 41
    IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
    QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\'
    QMAKE_RPATHDIR =
}


contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
42

con's avatar
con committed
43
CONFIG += plugin plugin_with_soname
44

45
unix:!macx {
46
    target.path = /$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
47
    pluginspec.files += $${TARGET}.pluginspec
48
    pluginspec.path = /$$IDE_LIBRARY_BASENAME/qtcreator/plugins/$$PROVIDER
49
    INSTALLS += target pluginspec
50
}