Moved usagetracker defines to usagetracker.pri
[librepilot.git] / ground / gcs / src / plugin.pri
blob33548c23f51bc5a024c395c91e2d40373a62a283
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 QT += widgets
12 # copy the plugin spec
13 isEmpty(TARGET) {
14     error("qtcreatorplugin.pri: You must provide a TARGET")
17 PLUGINSPECS = $${_PRO_FILE_PWD_}/$${TARGET}.pluginspec
18 copy2build.input = PLUGINSPECS
19 copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
20 copy2build.variable_out = PRE_TARGETDEPS
21 copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
22 copy2build.name = COPY ${QMAKE_FILE_IN}
23 copy2build.CONFIG += no_link
24 QMAKE_EXTRA_COMPILERS += copy2build
26 TARGET = $$qtLibraryName($$TARGET)
28 macx {
29         QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
30 } else:linux-* {
31     QMAKE_RPATHDIR  = $$shell_quote(\$$ORIGIN)
32     QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_LIBRARY_PATH, $$DESTDIR))
33     QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_QT_LIBRARY_PATH, $$DESTDIR))
34     QMAKE_RPATHDIR += $$shell_quote(\$$ORIGIN/$$relative_path($$GCS_LIBRARY_PATH/osg, $$DESTDIR))
35     include(rpath.pri)
39 contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
41 CONFIG += plugin plugin_with_soname
43 !macx {
44     target.path = /$$GCS_LIBRARY_BASENAME/gcs/plugins/$$PROVIDER
45     pluginspec.files += $${TARGET}.pluginspec
46     pluginspec.path = /$$GCS_LIBRARY_BASENAME/gcs/plugins/$$PROVIDER
47     INSTALLS += target pluginspec