summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-07-20 12:07:25 (GMT)
committeraxis <qt-info@nokia.com>2010-07-21 10:42:15 (GMT)
commitc578c6c1d6dc2f3bb6cc53abb8da2e706a249f02 (patch)
tree4e4704797cc8d08a412ad411d2286285805e82f5 /src/plugins/sqldrivers
parentd9e75d77ac3da86c32d280895beac2936d8869ca (diff)
downloadQt-c578c6c1d6dc2f3bb6cc53abb8da2e706a249f02.zip
Qt-c578c6c1d6dc2f3bb6cc53abb8da2e706a249f02.tar.gz
Qt-c578c6c1d6dc2f3bb6cc53abb8da2e706a249f02.tar.bz2
Fixed automatic sqlite extraction on Symbian makefile build system.
Since we cannot extract to the epocroot (it is considered R/O), we extract the header and the dso to the temporary build directories and include them from there. RevBy: Trust me
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri38
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro2
2 files changed, 39 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
new file mode 100644
index 0000000..ab8d846
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
@@ -0,0 +1,38 @@
+# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
+!symbian-abld:!symbian-sbsv2 {
+ !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_header.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_header.output = sqlite3.h
+ !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output
+ symbian_sqlite3_header.CONFIG = combine no_link
+ symbian_sqlite3_header.dependency_type = TYPE_C
+ symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_dso.output = sqlite3.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
+ symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
+ symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
+
+ symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
+ symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG
+ symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso
+
+ QMAKE_LIBDIR *= $$OBJECTS_DIR
+ }
+}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 691cce1..0d233e6 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,7 @@
TEMPLATE = subdirs
# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-symbian {
+symbian-abld|symbian-sbsv2 {
!symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
}