Merged in alessiomorale/librepilot/lp-446_battery_failsafe (pull request #355)
[librepilot.git] / ground / gcs / src / plugin.pri
blob88d8f2bce06f0bfe935df61812458bea856f40f9
1 include(../gcs.pri)
3 isEmpty(PROVIDER):PROVIDER = "$$ORG_BIG_NAME"
5 DESTDIR = $$GCS_PLUGIN_PATH/$$PROVIDER
6 LIBS += -L$$DESTDIR
7 INCLUDEPATH += $$GCS_SOURCE_TREE/src/plugins
8 DEPENDPATH += $$GCS_SOURCE_TREE/src/plugins
10 # copy the plugin spec
11 isEmpty(TARGET) {
12     error("qtcreatorplugin.pri: You must provide a TARGET")
15 PLUGINSPECS = $${_PRO_FILE_PWD_}/$${TARGET}.pluginspec
16 copy2build.input = PLUGINSPECS
17 copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
18 copy2build.variable_out = PRE_TARGETDEPS
19 copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
20 copy2build.name = COPY ${QMAKE_FILE_IN}
21 copy2build.CONFIG += no_link
22 QMAKE_EXTRA_COMPILERS += copy2build
24 TARGET = $$qtLibraryName($$TARGET)
26 macx {
27     QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
28 } else:linux-* {
29     QMAKE_RPATHDIR  = $$shell_quote(\$$ORIGIN)
30     QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_LIBRARY_PATH, $$DESTDIR))
31     QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_QT_LIBRARY_PATH, $$DESTDIR))
32     include(rpath.pri)
35 contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
37 CONFIG += plugin plugin_with_soname
39 !macx {
40     target.path = /$$GCS_LIBRARY_BASENAME/gcs/plugins/$$PROVIDER
41     pluginspec.files += $${TARGET}.pluginspec
42     pluginspec.path = /$$GCS_LIBRARY_BASENAME/gcs/plugins/$$PROVIDER
43     INSTALLS += target pluginspec