diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/plugins.pri | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/plugins.pri')
| -rw-r--r-- | SQLiteStudio3/plugins.pri | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/SQLiteStudio3/plugins.pri b/SQLiteStudio3/plugins.pri new file mode 100644 index 0000000..30fd709 --- /dev/null +++ b/SQLiteStudio3/plugins.pri @@ -0,0 +1,138 @@ +CONFIG += c++11 plugin + +DESTDIR = $$PWD/../output/SQLiteStudio/plugins +OBJECTS_DIR = $$PWD/../output/build +MOC_DIR = $$PWD/../output/build +UI_DIR = $$PWD/../output/build + +INCLUDEPATH += $$PWD/coreSQLiteStudio +DEPENDPATH += $$PWD/coreSQLiteStudio + +PLUGINSDIR = $$PWD/../Plugins +INCLUDEPATH += $$PLUGINSDIR +DEPENDPATH += $$PLUGINSDIR + +export (PLUGINSDIR) + +contains(QT, gui) { + INCLUDEPATH += $$PWD/guiSQLiteStudio + INCLUDEPATH += $$UI_DIR/guiSQLiteStudio + DEPENDPATH += $$PWD/guiSQLiteStudio +} + +win32: { + INCLUDEPATH += $$PWD/../../include + LIBS += -L$$PWD/../../lib -L$$DESTDIR/.. -lcoreSQLiteStudio -L$$PWD/../output/SQLiteStudio/plugins + + defineTest(pluginDep) { + linker_flag_parts = -l $$1 + linker_flag = $$join(linker_flag_parts) + LIBS += $$linker_flag + export(LIBS) + } + + defineTest(frameworkDep) { + linker_flag_parts = -l $$1 + linker_flag = $$join(linker_flag_parts) + LIBS += $$linker_flag + export(LIBS) + } + + contains(QT, gui) { + LIBS += -lguiSQLiteStudio + } + + SO_NAME = ddl + SO_PREFIX = lib + PLATFORM = win32 + export(SO_NAME) + export(SO_PREFIX) + export(PLATFORM) +} + +unix: { + defineTest(pluginDep) { + } + + defineTest(frameworkDep) { + linker_flag_parts = -l $$1 + linker_flag = $$join(linker_flag_parts) + LIBS += $$linker_flag + export(LIBS) + } + + target.path = /usr/lib/sqlitestudio + INSTALLS += target +} + +linux: { + SO_NAME = so + SO_PREFIX = lib + PLATFORM = linux32 + equals(QMAKE_HOST.arch, "x86_64") { + PLATFORM = linux64 + } + export(SO_NAME) + export(SO_PREFIX) + export(PLATFORM) +} + +macx: { + GUI_APP = $$PWD/../output/SQLiteStudio/SQLiteStudio.app/Contents/MacOS/SQLiteStudio + export (GUI_APP) + + LIBS += -L$$PWD/../output/SQLiteStudio -lcoreSQLiteStudio + INCLUDEPATH += $$PWD/../../include + LIBS += -L$$PWD/../../lib -L$$DESTDIR + QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7 + + defineTest(pluginDep) { + out_file_parts = $$DESTDIR/lib $$TARGET .dylib + out_file = $$join(out_file_parts) + lib_name_parts = lib $$1 .dylib + lib_name = $$join(lib_name_parts) + QMAKE_POST_LINK += install_name_tool -change $$lib_name @loader_path/../plugins/$$lib_name $$out_file + export(QMAKE_POST_LINK) + + linker_flag_parts = -l $$1 + linker_flag = $$join(linker_flag_parts) + LIBS += $$linker_flag + export(LIBS) + } + + defineTest(frameworkDep) { + out_file_parts = $$DESTDIR/lib $$TARGET .dylib + out_file = $$join(out_file_parts) + lib_name_parts = lib $$1 .dylib + lib_name = $$join(lib_name_parts) + QMAKE_POST_LINK += install_name_tool -change $$lib_name @loader_path/../Frameworks/$$lib_name $$out_file + export(QMAKE_POST_LINK) + + linker_flag_parts = -l $$1 + linker_flag = $$join(linker_flag_parts) + LIBS += $$linker_flag + export(LIBS) + } + + SO_NAME = dylib + SO_PREFIX = lib + PLATFORM = macosx + export(SO_NAME) + export(SO_PREFIX) + export(PLATFROM) +} + +win32|macx: { + CONFIG += portable + + contains(QT, gui) { + LIBS += -lguiSQLiteStudio + } +} + +portable { + QMAKE_LFLAGS += -Wl,-rpath,. -Wl,-rpath,.. + linux: { + QMAKE_LFLAGS += -Wl,-rpath,../lib + } +} |
