diff options
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/java.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/metatypes.prf | 16 | ||||
-rw-r--r-- | mkspecs/features/qt_example_installs.prf | 10 |
3 files changed, 19 insertions, 9 deletions
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf index f1f5e4c10c..1d52f05e52 100644 --- a/mkspecs/features/java.prf +++ b/mkspecs/features/java.prf @@ -20,7 +20,7 @@ CONFIG += plugin no_plugin_name_prefix javac.input = JAVASOURCES javac.output = $$CLASS_DIR javac.CONFIG += combine -javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} +javac.commands = javac -source 7 -target 7 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} # Force rebuild every time, because we don't know the paths of the destination files # as they depend on the code. javac.depends = FORCE diff --git a/mkspecs/features/metatypes.prf b/mkspecs/features/metatypes.prf index a0a548eeb2..64387458ac 100644 --- a/mkspecs/features/metatypes.prf +++ b/mkspecs/features/metatypes.prf @@ -2,17 +2,25 @@ qtPrepareTool(MOC_COLLECT_JSON, moc) QMAKE_MOC_OPTIONS += --output-json +MOC_JSON_H_BASE = $${QMAKE_H_MOD_MOC} +MOC_JSON_CPP_BASE = $${QMAKE_CPP_MOD_MOC} + +!isEmpty(MOC_DIR) { + MOC_JSON_H_BASE = $$MOC_DIR/$${MOC_JSON_H_BASE} + MOC_JSON_CPP_BASE = $$MOC_DIR/$${MOC_JSON_CPP_BASE} +} + moc_json_header.input = HEADERS -moc_json_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json +moc_json_header.output = $${MOC_JSON_H_BASE}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json moc_json_header.CONFIG = no_link moc_verify -moc_json_header.depends = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)} +moc_json_header.depends = $${MOC_JSON_H_BASE}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)} moc_json_header.commands = $$escape_expand(\\n) # force creation of rule moc_json_header.variable_out = MOC_JSON_FILES moc_json_source.input = SOURCES -moc_json_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}.json +moc_json_source.output = $${MOC_JSON_CPP_BASE}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}.json moc_json_source.CONFIG = no_link moc_verify -moc_json_source.depends = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC} +moc_json_source.depends = $${MOC_JSON_CPP_BASE}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC} moc_json_source.commands = $$escape_expand(\\n) # force creation of rule moc_json_source.variable_out = MOC_JSON_FILES diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 43b58817fe..72b47bce27 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -25,14 +25,16 @@ defineTest(addInstallFiles) { export($$1) } -probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) +moduleRoot = $$dirname(_QMAKE_CONF_) +probase = $$relative_path($$_PRO_FILE_PWD_, $$moduleRoot/examples) isEmpty(probase)|contains(probase, ^\\..*): \ return() isEmpty(_QMAKE_CACHE_) { - !equals(OUT_PWD, $$_PRO_FILE_PWD_): \ - return() - error("You cannot build examples inside the Qt source tree, except as part of a proper Qt build.") + moduleRootRelativeToBuildDir = $$relative_path($$moduleRoot, $$OUT_PWD) + # Check if OUT_PWD is inside module root + equals(moduleRootRelativeToBuildDir, .)|contains(moduleRootRelativeToBuildDir, \(\.\./\)+\(\.\.\)?): \ + error("You cannot build examples inside the Qt source tree, except as part of a proper Qt build.") } contains(TEMPLATE, "vc.*"): \ |