summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian/platform_paths.prf
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-06-14 10:44:43 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-06-14 11:09:13 (GMT)
commita75945a402eb2bee7bfa633f3cced735601ad727 (patch)
tree66c8a469e209be906bf0d5f9784f01d048f30903 /mkspecs/features/symbian/platform_paths.prf
parent1c20abaaeef1ab448526e5821db06350537c1333 (diff)
downloadQt-a75945a402eb2bee7bfa633f3cced735601ad727.zip
Qt-a75945a402eb2bee7bfa633f3cced735601ad727.tar.gz
Qt-a75945a402eb2bee7bfa633f3cced735601ad727.tar.bz2
Added prependEpocroot replacement function to platform_paths.prf
This function can be used to do smart prepending of epocroot to paths defined by platform_paths.prf, though it'll work for any string. This is useful because paths defined in platform_paths.prf can start either with full epocroot or just slash depending on environment. E.g. exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h))) { ... } Reviewed-by: Janne Koskinen
Diffstat (limited to 'mkspecs/features/symbian/platform_paths.prf')
-rw-r--r--mkspecs/features/symbian/platform_paths.prf20
1 files changed, 19 insertions, 1 deletions
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index 0e8770d..5c190c8 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -45,8 +45,17 @@
# INCLUDEPATH += $$OS_LAYER_DBUS_SYSTEMINCLUDE
# INCLUDEPATH += $$OS_LAYER_LIBUTILITY_SYSTEMINCLUDE
#
+# These paths are primarily meant to be used as is in bld.inf and .mmp
+# files, so they do not contain epocroot when using official symbian
+# toolchains (symbian-abld or symbian-sbsv2).
+# For makefile based mkspecs, epocroot is prepended to all paths for
+# convenience.
#
-#
+# To use paths defined here in other contexts that require epocroot to be
+# prepended always, such as exists checks, please use prependEpocroot
+# replacement function:
+#
+# exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h)))
#
# ==============================================================================
@@ -472,4 +481,13 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
STLLIB_USAGE_CW_FLAGS = "-wchar_t on"
STLLIB_USAGE_DEFINES = _WCHAR_T_DECLARED
+ # Smart prepend of EPOCROOT to a string
+ defineReplace(prependEpocroot) {
+ contains(1, ^$${EPOCROOT}) {
+ return($$1)
+ } else {
+ return($${EPOCROOT}$$replace(1,"^/",))
+ }
+ }
+
}