summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-22 16:35:41 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-22 16:35:43 +0200
commit4c231d5df3040dbf4545a9a77145ee0e1f9c380c (patch)
tree2cc5b71a5d2b464214cf5372776913fbe4622e1e /mkspecs
parent7df16fb4ccbe0476bc34274a77e98eec4e8d2d93 (diff)
parentd672ef07681a959d9559dd1e11e70db1f448a7f1 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/android-g++/qmake.conf5
-rw-r--r--mkspecs/common/wince/qmake.conf1
-rw-r--r--mkspecs/features/cmake_functions.prf16
-rw-r--r--mkspecs/features/create_cmake.prf19
-rw-r--r--mkspecs/features/ctest_testcase.prf2
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in16
-rw-r--r--mkspecs/features/mac/sdk.prf4
-rw-r--r--mkspecs/features/module.prf1
-rw-r--r--mkspecs/features/qt_module_config.prf2
-rw-r--r--mkspecs/features/wayland-scanner.prf50
10 files changed, 94 insertions, 22 deletions
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf
index c780e2f0d5..7e78725858 100644
--- a/mkspecs/android-g++/qmake.conf
+++ b/mkspecs/android-g++/qmake.conf
@@ -18,10 +18,15 @@ contains(QMAKE_HOST.os,Windows) {
# Not having sh.exe in your path causes this condition to pass
# To build Android Qt on Windows, this block must not be evaluated.
isEmpty(QMAKE_SH) {
+ # Override values from previously loaded shell-unix.conf
+ # (via unix.conf, via linux.conf).
include(../common/shell-win32.conf)
QMAKE_DEL_TREE = rmdir /s /q
QMAKE_INSTALL_FILE = copy /y
QMAKE_INSTALL_PROGRAM = copy /y
+ } else {
+ MINGW_IN_SHELL = 1
+ QMAKE_DIR_SEP = /
}
}
diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf
index b006992702..5e6e6f0421 100644
--- a/mkspecs/common/wince/qmake.conf
+++ b/mkspecs/common/wince/qmake.conf
@@ -62,6 +62,7 @@ QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_LIBS_NETWORK = ws2.lib
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
+QMAKE_EXTENSION_STATICLIB = lib
QMAKE_LIBS_EGL = libEGL.lib
QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib
diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf
index 62634d9b88..1285990206 100644
--- a/mkspecs/features/cmake_functions.prf
+++ b/mkspecs/features/cmake_functions.prf
@@ -24,3 +24,19 @@ defineReplace(cmakeModuleList) {
}
return ($$join(out, ";"))
}
+
+defineReplace(cmakeTargetPath) {
+ SYSR = $$[QT_SYSROOT]
+ !isEmpty(SYSR): path = $$relative_path($$1, $$[QT_SYSROOT])
+ else: path = $$1
+ return(/$$path)
+}
+
+defineReplace(cmakeTargetPaths) {
+ variable = $$1
+ out =
+ for(v, variable) {
+ out += \"$$cmakeTargetPath($$v)\"
+ }
+ return ($$join(out, " "))
+}
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index cf0acaf4b7..a9757acd17 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -27,19 +27,22 @@ CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
# The /lib paths are made symlinks to the /usr/lib paths. If someone searching
# for a Qt 5 package finds it in /lib/cmake/Qt5Core, although it has been
# installed in /usr/lib/cmake/Qt5Core, relative paths to the includes and
-# executables will not work. So, we treat installations to /usr as non-relocatable
-# packages with absolute paths.
-CMAKE_INSTALL_LIBS_DIR = $$[QT_INSTALL_LIBS]
-contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_FORCE_ABSOLUTE_PATHS = True
+# executables will not work.
+# To work around this, we insert code into the generated config files to check
+# at cmake time whether package has been found via a symlink, and correct
+# that to an absolute path. This is only done for installations to
+# the /usr or / prefix.
+CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
+contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
-!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
+contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
}
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
-!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
+contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
CMAKE_LIB_DIR_IS_ABSOLUTE = True
} else {
@@ -50,13 +53,13 @@ CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
}
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
-!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
+contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
CMAKE_BIN_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, "^\\.\\./.*") {
+contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*") {
CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA]/
CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = True
}
diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf
index c88fc961cf..3045a21672 100644
--- a/mkspecs/features/ctest_testcase.prf
+++ b/mkspecs/features/ctest_testcase.prf
@@ -37,7 +37,7 @@ isEmpty(CMAKE_VERSION) {
CMAKE_BUILD_TYPE = Debug
CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
- win32-g++*:CMAKE_GENERATOR = -G \"MinGW Makefiles\"
+ win32-g++*:isEmpty(CROSS_COMPILE):CMAKE_GENERATOR = -G \"MinGW Makefiles\"
win32:equals(QT_ARCH, x86_64) {
win32-msvc2010:CMAKE_GENERATOR = -G \"Visual Studio 10 Win64\"
win32-msvc2012:CMAKE_GENERATOR = -G \"Visual Studio 11 Win64\"
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index d88f6e1224..a77a6bd22d 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -3,7 +3,21 @@ if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR \"Qt 5 requires at least CMake version 2.8.3\")
endif()
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
+get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
+# Use original install prefix when loaded through a
+# cross-prefix symbolic link such as /lib -> /usr/lib.
+get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
+get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR\" PATH)
+else()
+ get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+endif()
+unset(_realOrig)
+unset(_realCurr)
+unset(_IMPORT_PREFIX)
+!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
!!ELSE
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index ece0e27536..f5b1639a5d 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -31,9 +31,9 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
}
# We use xml as the output format instead of json since plutil on 10.6 does not have that option
-QMAKE_MAC_PLATFORM_NAME = $$system("plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - | " \
+QMAKE_MAC_PLATFORM_NAME = $$system("/usr/bin/plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - 2>/dev/null | " \
"sed '/^<!DOCTYPE/d' | " \ # Don't look up http://www.apple.com/DTDs/PropertyList-1.0.dtd
- "PERL5LIB= xpath 'string(//key[.=\"PLATFORM_NAME\"]/following-sibling::*[1])' 2>&1 | " \
+ "PERL5LIB= xpath 'string(//key[.=\"PLATFORM_NAME\"]/following-sibling::*[1])' 2>/dev/null | " \
"sed 's/.*Value: \\(.*\\)/\\1/'")
isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK '$$QMAKE_MAC_SDK'")
diff --git a/mkspecs/features/module.prf b/mkspecs/features/module.prf
deleted file mode 100644
index 916430d493..0000000000
--- a/mkspecs/features/module.prf
+++ /dev/null
@@ -1 +0,0 @@
-warning("CONFIG+=module is obsolete. load(qt_module) is sufficient.")
diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf
deleted file mode 100644
index 79b939a217..0000000000
--- a/mkspecs/features/qt_module_config.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-warning("load(qt_module_config) is obsolete. Use load(qt_module) instead.")
-load(qt_module)
diff --git a/mkspecs/features/wayland-scanner.prf b/mkspecs/features/wayland-scanner.prf
index 90e1e0f953..2ec064f29d 100644
--- a/mkspecs/features/wayland-scanner.prf
+++ b/mkspecs/features/wayland-scanner.prf
@@ -1,32 +1,68 @@
#
-# Wayland-scanner extra-compiler for handling files specified in the WAYLANDSOURCES variable
+# Extra-compilers for handling files specified in
+# the WAYLANDSERVERSOURCES and WAYLANDCLIENTSOURCES variables
#
isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
wayland-server-header.name = wayland ${QMAKE_FILE_BASE}
-wayland-server-header.input = WAYLANDSOURCES
+wayland-server-header.input = WAYLANDSERVERSOURCES
wayland-server-header.variable_out = HEADERS
wayland-server-header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
wayland-server-header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
-
silent:wayland-server-header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland-server-header.commands
QMAKE_EXTRA_COMPILERS += wayland-server-header
wayland-client-header.name = wayland ${QMAKE_FILE_BASE}
-wayland-client-header.input = WAYLANDSOURCES
+wayland-client-header.input = WAYLANDCLIENTSOURCES
wayland-client-header.variable_out = HEADERS
wayland-client-header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
wayland-client-header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
-
silent:wayland-client-header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland-client-header.commands
QMAKE_EXTRA_COMPILERS += wayland-client-header
wayland-code.name = wayland ${QMAKE_FILE_BASE}
-wayland-code.input = WAYLANDSOURCES
+wayland-code.input = WAYLANDCLIENTSOURCES WAYLANDSERVERSOURCES
wayland-code.variable_out = SOURCES
wayland-code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
wayland-code.commands = $$QMAKE_WAYLAND_SCANNER code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
-
silent:wayland-code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland-code.commands
QMAKE_EXTRA_COMPILERS += wayland-code
+
+qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
+
+qtwayland-client-header.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland-client-header.input = WAYLANDCLIENTSOURCES
+qtwayland-client-header.variable_out = HEADERS
+qtwayland-client-header.depends = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
+qtwayland-client-header.output = qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland-client-header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+silent:qtwayland-client-header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland-client-header.commands
+QMAKE_EXTRA_COMPILERS += qtwayland-client-header
+
+qtwayland-client-code.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland-client-code.input = WAYLANDCLIENTSOURCES
+qtwayland-client-code.variable_out = SOURCES
+qtwayland-client-code.depends = qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland-client-code.output = qwayland-${QMAKE_FILE_BASE}.cpp
+qtwayland-client-code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+silent:qtwayland-client-code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland-client-code.commands
+QMAKE_EXTRA_COMPILERS += qtwayland-client-code
+
+qtwayland-server-header.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland-server-header.input = WAYLANDSERVERSOURCES
+qtwayland-server-header.variable_out = HEADERS
+qtwayland-server-header.depends = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
+qtwayland-server-header.output = qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland-server-header.commands = $$QMAKE_QTWAYLANDSCANNER server-header ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+silent:qtwayland-server-header.commands = @echo QtWayland server header ${QMAKE_FILE_IN} && $$qtwayland-server-header.commands
+QMAKE_EXTRA_COMPILERS += qtwayland-server-header
+
+qtwayland-server-code.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland-server-code.input = WAYLANDSERVERSOURCES
+qtwayland-server-code.variable_out = SOURCES
+qtwayland-server-code.depends = qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland-server-code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp
+qtwayland-server-code.commands = $$QMAKE_QTWAYLANDSCANNER server-code ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+silent:qtwayland-server-code.commands = @echo QtWayland server code ${QMAKE_FILE_IN} && $$qtwayland-server-code.commands
+QMAKE_EXTRA_COMPILERS += qtwayland-server-code