summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/default_pre.prf47
-rw-r--r--mkspecs/features/mac/default_post.prf4
-rw-r--r--mkspecs/features/mac/default_pre.prf2
-rw-r--r--mkspecs/features/mac/toolchain.prf5
-rw-r--r--mkspecs/features/toolchain.prf47
-rw-r--r--mkspecs/features/uikit/default_pre.prf4
6 files changed, 56 insertions, 53 deletions
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index b655f2e0ca..2d52525190 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -23,49 +23,4 @@ CONFIG = \
unset(today)
}
-isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
- #
- # Get default include and library paths from compiler
- #
- gcc {
- !equals(QMAKE_HOST.os, Windows) {
- cmd_prefix = "LC_ALL=C"
- cmd_suffix = "</dev/null >/dev/null"
- } else {
- cmd_prefix = "set LC_ALL=C&"
- cmd_suffix = "<NUL >NUL"
- }
- output = $$system("$$cmd_prefix $$QMAKE_CXX $$QMAKE_CXXFLAGS -xc++ -E -v - 2>&1 $$cmd_suffix", lines)
- add_includes = false
- for (line, output) {
- line ~= s/^ *// # remove leading spaces
- contains(line, "LIBRARY_PATH=.*") {
- line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
- paths = $$split(line, $$QMAKE_DIRLIST_SEP)
- for (path, paths): \
- QMAKE_DEFAULT_LIBDIRS += $$clean_path($$path)
- } else: contains(line, "$${LITERAL_HASH}include <.*") { # #include <...> search starts here:
- add_includes = true
- } else: contains(line, "End of search.*") {
- add_includes = false
- } else: $$add_includes {
- !contains(line, ".* \\(framework directory\\)"): \
- QMAKE_DEFAULT_INCDIRS += $$clean_path($$line)
- }
- }
- QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
- } else: msvc {
- LIB = $$getenv("LIB")
- QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP)
- INCLUDE = $$getenv("INCLUDE")
- QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
- }
-
- unix {
- isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
- isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
- }
-
- !isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash)
- !isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash)
-}
+load(toolchain)
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 7bf6b4a716..99c92d15f0 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -35,7 +35,3 @@ cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
cache(QMAKE_XCODE_VERSION, stash)
QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
-
-# Ensure that we process sdk.prf first, as it will update QMAKE_CXX
-# and friends that other features/extra compilers may depend on.
-sdk: load(sdk)
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 2064d976d7..e21e749ee9 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -1,4 +1,4 @@
-CONFIG = asset_catalogs sdk rez $$CONFIG
+CONFIG = asset_catalogs rez $$CONFIG
load(default_pre)
isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf
new file mode 100644
index 0000000000..df191eb13c
--- /dev/null
+++ b/mkspecs/features/mac/toolchain.prf
@@ -0,0 +1,5 @@
+# Ensure that we process sdk.prf first, as it will update QMAKE_CXX,
+# which the default path determination uses.
+sdk: load(sdk)
+
+load(toolchain)
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
new file mode 100644
index 0000000000..70547a3cdf
--- /dev/null
+++ b/mkspecs/features/toolchain.prf
@@ -0,0 +1,47 @@
+
+isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
+ #
+ # Get default include and library paths from compiler
+ #
+ gcc {
+ !equals(QMAKE_HOST.os, Windows) {
+ cmd_prefix = "LC_ALL=C"
+ cmd_suffix = "</dev/null >/dev/null"
+ } else {
+ cmd_prefix = "set LC_ALL=C&"
+ cmd_suffix = "<NUL >NUL"
+ }
+ output = $$system("$$cmd_prefix $$QMAKE_CXX $$QMAKE_CXXFLAGS -xc++ -E -v - 2>&1 $$cmd_suffix", lines)
+ add_includes = false
+ for (line, output) {
+ line ~= s/^ *// # remove leading spaces
+ contains(line, "LIBRARY_PATH=.*") {
+ line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
+ paths = $$split(line, $$QMAKE_DIRLIST_SEP)
+ for (path, paths): \
+ QMAKE_DEFAULT_LIBDIRS += $$clean_path($$path)
+ } else: contains(line, "$${LITERAL_HASH}include <.*") { # #include <...> search starts here:
+ add_includes = true
+ } else: contains(line, "End of search.*") {
+ add_includes = false
+ } else: $$add_includes {
+ !contains(line, ".* \\(framework directory\\)"): \
+ QMAKE_DEFAULT_INCDIRS += $$clean_path($$line)
+ }
+ }
+ QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
+ } else: msvc {
+ LIB = $$getenv("LIB")
+ QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP)
+ INCLUDE = $$getenv("INCLUDE")
+ QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
+ }
+
+ unix {
+ isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
+ isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
+ }
+
+ !isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash)
+ !isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash)
+}
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index 8b5b3ccfe9..b6974388ce 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -1,6 +1,4 @@
-load(default_pre)
-
!isEmpty(QT_VERSION) {
qtConfig(simulator_and_device)|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
CONFIG += device $${device.sdk}
@@ -17,6 +15,8 @@ load(default_pre)
}
}
+load(default_pre)
+
# Check for supported Xcode versions
lessThan(QMAKE_XCODE_VERSION, "4.3"): \
error("This mkspec requires Xcode 4.3 or later")