Extract some cmake related functions for re-use.
These will be used by ctest_testcase.prf. Change-Id: I8a0e6e1eb110daba41b007c8309f3cb9a2059ecb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
8b29c7539d
commit
cdca61f09a
26
mkspecs/features/cmake_functions.prf
Normal file
26
mkspecs/features/cmake_functions.prf
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# W A R N I N G
|
||||
# -------------
|
||||
#
|
||||
# This file is not part of the Qt API. It exists purely as an
|
||||
# implementation detail. It may change from version to version
|
||||
# without notice, or even be removed.
|
||||
#
|
||||
# We mean it.
|
||||
#
|
||||
|
||||
defineReplace(cmakeModuleName) {
|
||||
_module = $$1
|
||||
_name = $$eval(QT.$${_module}.name)
|
||||
cmake_module_name = $$replace(_name, ^Qt, )
|
||||
return ($$cmake_module_name)
|
||||
}
|
||||
|
||||
defineReplace(cmakeModuleList) {
|
||||
variable = $$1
|
||||
out =
|
||||
for(v, variable) {
|
||||
out += $$cmakeModuleName($$v)
|
||||
}
|
||||
return ($$join(out, ";"))
|
||||
}
|
@ -9,21 +9,7 @@
|
||||
# We mean it.
|
||||
#
|
||||
|
||||
defineReplace(cmakeModuleName) {
|
||||
_module = $$1
|
||||
_name = $$eval(QT.$${_module}.name)
|
||||
cmake_module_name = $$replace(_name, ^Qt, )
|
||||
return ($$cmake_module_name)
|
||||
}
|
||||
|
||||
defineReplace(cmakeModuleList) {
|
||||
variable = $$1
|
||||
out =
|
||||
for(v, variable) {
|
||||
out += $$cmakeModuleName($$v)
|
||||
}
|
||||
return ($$join(out, ";"))
|
||||
}
|
||||
load(cmake_functions)
|
||||
|
||||
defineReplace(cmakeRelativePath) {
|
||||
path = $$relative_path($$1, $$2)
|
||||
|
Loading…
Reference in New Issue
Block a user