summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/clang-mac.conf3
-rw-r--r--mkspecs/common/mac.conf3
-rw-r--r--mkspecs/common/xcode.conf8
-rw-r--r--mkspecs/features/c++11.prf7
-rw-r--r--mkspecs/features/create_cmake.prf8
-rw-r--r--mkspecs/features/ctest_testcase.prf20
-rw-r--r--mkspecs/features/data/android/dx.bat2
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in6
-rw-r--r--mkspecs/features/exclusive_builds.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf4
-rw-r--r--mkspecs/features/mac/sdk.prf9
-rw-r--r--mkspecs/features/qt_parts.prf3
-rwxr-xr-xmkspecs/unsupported/macx-ios-clang/Info.plist.app8
-rw-r--r--mkspecs/unsupported/macx-ios-clang/qmake.conf5
14 files changed, 70 insertions, 18 deletions
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index efe771d24d..3280274f36 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -5,3 +5,6 @@ QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT}
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
+
+QMAKE_CXXFLAGS_CXX11 += -stdlib=libc++
+QMAKE_LFLAGS_CXX11 += -stdlib=libc++
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index cf54f3f580..f31db3bb4b 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -26,4 +26,7 @@ QMAKE_LIBS_THREAD =
QMAKE_AR = ar cq
QMAKE_RANLIB = ranlib -s
+# We rely on Xcode to build
+include(xcode.conf)
+
include(unix.conf)
diff --git a/mkspecs/common/xcode.conf b/mkspecs/common/xcode.conf
index 9da6406f7f..b15266b678 100644
--- a/mkspecs/common/xcode.conf
+++ b/mkspecs/common/xcode.conf
@@ -3,7 +3,7 @@
#
# Get path of Xcode's Developer directory
-QMAKE_XCODE_DEVELOPER_PATH = $$system("xcode-select --print-path")
+QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
@@ -11,7 +11,11 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
!exists($$QMAKE_XCODE_DEVELOPER_PATH): \
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
+# Make sure Xcode is set up properly
+isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
+ error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
+
# Extract Xcode version using xcodebuild
-xcode_version = $$system("xcodebuild -version")
+xcode_version = $$system("/usr/bin/xcodebuild -version")
QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
unset(xcode_version)
diff --git a/mkspecs/features/c++11.prf b/mkspecs/features/c++11.prf
index 4b56fa9fd2..32eaca4a9b 100644
--- a/mkspecs/features/c++11.prf
+++ b/mkspecs/features/c++11.prf
@@ -1,3 +1,10 @@
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_CXX11
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CXXFLAGS_CXX11
QMAKE_LFLAGS += $$QMAKE_LFLAGS_CXX11
+
+contains(QMAKE_LFLAGS, -stdlib=libc++) {
+ equals(QMAKE_MACOSX_DEPLOYMENT_TARGET, 10.6): \
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
+ contains(QMAKE_IOS_DEPLOYMENT_TARGET, ^4.*): \
+ QMAKE_IOS_DEPLOYMENT_TARGET = 5.0
+}
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 9aef37472f..cf0acaf4b7 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -55,10 +55,10 @@ CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
-CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX])
-!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs
- CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/
- CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True
+CMAKE_HOST_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX])
+!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*") {
+ CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA]/
+ CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = True
}
static|staticlib:CMAKE_STATIC_TYPE = true
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index 79adde3446..7faf738d6e 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -56,9 +56,27 @@ isEmpty(CMAKE_VERSION) {
SET = set
equals(QMAKE_DIR_SEP, "/"):SET = export
+ CMAKE_MODULE_VERSIONS =
+ CMAKE_MODULES_UNDER_TEST =
+ for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
+ CMAKE_NAME = $$cmakeModuleName($$MODULE_UNDER_TEST)
+ CMAKE_MODULE_VERSIONS += \
+ -DCMAKE_$${CMAKE_NAME}_MODULE_MAJOR_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.MAJOR_VERSION) \
+ -DCMAKE_$${CMAKE_NAME}_MODULE_MINOR_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.MINOR_VERSION) \
+ -DCMAKE_$${CMAKE_NAME}_MODULE_PATCH_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.PATCH_VERSION)
+ CMAKE_MODULES_UNDER_TEST += $$CMAKE_NAME
+ }
+ CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;)
+
check.commands = \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && $$SET VERBOSE=1 && \
- cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR $$CMAKE_MODULE_DEFINES -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" && \
+ cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \
+ $$CMAKE_MODULE_DEFINES \
+ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \
+ -DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \
+ -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" \
+ $${CMAKE_MODULE_VERSIONS} \
+ -DCMAKE_MODULES_UNDER_TEST=\"$$CMAKE_MODULES_UNDER_TEST\" && \
$(TESTRUNNER) ctest --output-on-failure
}
diff --git a/mkspecs/features/data/android/dx.bat b/mkspecs/features/data/android/dx.bat
index a60a1b4cbe..af143c52b5 100644
--- a/mkspecs/features/data/android/dx.bat
+++ b/mkspecs/features/data/android/dx.bat
@@ -41,7 +41,7 @@ set jarfile=dx.jar
set "frameworkdir=%androidsdk%\platform-tools"
if exist "%frameworkdir%\%jarfile%" goto JarFileOk
- set "frameworkdir=%androidsdk%\lib"
+ set "frameworkdir=%frameworkdir%\lib"
if exist "%frameworkdir%\%jarfile%" goto JarFileOk
set "frameworkdir=%androidsdk%\framework"
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index e5bbc97161..65ba03d44c 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -9,9 +9,7 @@ get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURREN
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
!!ENDIF
-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MAJOR "$$eval(QT.$${MODULE}.MAJOR_VERSION)")
-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MINOR "$$eval(QT.$${MODULE}.MINOR_VERSION)")
-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_PATCH "$$eval(QT.$${MODULE}.PATCH_VERSION)")
+# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
@@ -88,7 +86,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING} ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
- PATHS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}\" NO_DEFAULT_PATH
+ PATHS \"${CMAKE_CURRENT_LIST_DIR}/..\" NO_DEFAULT_PATH
)
endif()
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf
index adcad79fe1..c45ff22c06 100644
--- a/mkspecs/features/exclusive_builds.prf
+++ b/mkspecs/features/exclusive_builds.prf
@@ -6,7 +6,7 @@ defineTest(fixExclusiveOutputDirs) {
count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false
else:appendFirstBuild = true
- isEmpty(QMAKE_DIR_REPLACE):QMAKE_DIR_REPLACE += OBJECTS_DIR MOC_DIR RCC_DIR
+ isEmpty(QMAKE_DIR_REPLACE):QMAKE_DIR_REPLACE += OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR
lessThan(firstBuild, $$secondBuild):eval($${firstBuild}_and_$${secondBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
else:eval($${secondBuild}_and_$${firstBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
for(fix, QMAKE_DIR_REPLACE) {
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 714b4c7d06..437e3d93e4 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -15,3 +15,7 @@ qt:!isEmpty(QT_CONFIG) {
contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64
}
}
+
+# 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/sdk.prf b/mkspecs/features/mac/sdk.prf
index eaa3108a8b..ece0e27536 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -5,7 +5,7 @@ isEmpty(QMAKE_MAC_SDK): \
contains(QMAKE_MAC_SDK, .*/.*): \
error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
-QMAKE_MAC_SDK_PATH = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
+QMAKE_MAC_SDK_PATH = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'")
!equals(MAKEFILE_GENERATOR, XCODE) {
@@ -24,7 +24,9 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
value = $$eval($$tool)
isEmpty(value): next()
- sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value)")
+ sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
+ isEmpty(sysrooted): next()
+
$$tool = $$sysrooted $$member(value, 1, -1)
}
@@ -40,6 +42,9 @@ isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK
# FIXME: Get the version_min_flag out of the platform's 'Native Build System.xcspec'
version_identifier = $$replace(QMAKE_MAC_PLATFORM_NAME, iphonesimulator, ios-simulator)
+ # C++11 support may affect the deployment target
+ c++11: load(c++11)
+
ios:!host_build: \
deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
else: \
diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf
index 12ba312bcd..37dc849f83 100644
--- a/mkspecs/features/qt_parts.prf
+++ b/mkspecs/features/qt_parts.prf
@@ -9,6 +9,9 @@
# We mean it.
#
+# Ensure that each module has a .qmake.cache when properly qmake'd.
+cache()
+
load(qt_build_config)
TEMPLATE = subdirs
diff --git a/mkspecs/unsupported/macx-ios-clang/Info.plist.app b/mkspecs/unsupported/macx-ios-clang/Info.plist.app
index bcf7f41f27..c7d660b8d1 100755
--- a/mkspecs/unsupported/macx-ios-clang/Info.plist.app
+++ b/mkspecs/unsupported/macx-ios-clang/Info.plist.app
@@ -14,6 +14,14 @@
<string>@EXECUTABLE@</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.@BUNDLEIDENTIFIER@</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/unsupported/macx-ios-clang/qmake.conf b/mkspecs/unsupported/macx-ios-clang/qmake.conf
index 32d10a06ed..833e22e3bd 100644
--- a/mkspecs/unsupported/macx-ios-clang/qmake.conf
+++ b/mkspecs/unsupported/macx-ios-clang/qmake.conf
@@ -15,9 +15,6 @@ DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_N
# Universal target (iPhone and iPad)
QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2
-include(../../common/xcode.conf)
-lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
-
include(../../common/ios.conf)
include(../../common/gcc-base-mac.conf)
include(../../common/clang.conf)
@@ -25,4 +22,6 @@ include(../../common/clang-mac.conf)
include(../../common/ios/clang.conf)
include(../../common/ios/qmake.conf)
+lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
load(qt_config)