Commit b1477190 authored by Christian Kandeler's avatar Christian Kandeler Committed by Christian Kandeler

Fix qbs build on macOS

"osx" -> "macos"

Change-Id: Ie25e096b2759cf8f96411560fcca337169d80b08
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent ccf04023
......@@ -26,7 +26,7 @@ QtcProduct {
// The following would be conceptually right, but does not work currently as some autotests
// (e.g. extensionsystem) do not work when installed, because they want hardcoded
// absolute paths to resources in the build directory.
// cpp.rpaths: qbs.targetOS.contains("osx")
// cpp.rpaths: qbs.targetOS.contains("macos")
// ? ["@loader_path/../Frameworks", "@loader_path/../PlugIns"]
// : ["$ORIGIN/../" + qtc.libDirName + "/qtcreator",
// "$ORIGIN/../" qtc.libDirName + "/qtcreator/plugins"]
......
......@@ -28,7 +28,7 @@ Product {
Group {
fileTagsFilter: ["qch"]
qbs.install: !qbs.targetOS.contains("osx")
qbs.install: !qbs.targetOS.contains("macos")
qbs.installDir: qtc.ide_doc_path
}
}
......@@ -4,7 +4,7 @@ function qtLibraryName(qbs, name)
if (qbs.debugInformation) {
if (qbs.targetOS.contains("windows"))
return name + "d";
else if (qbs.targetOS.contains("osx"))
else if (qbs.targetOS.contains("macos"))
return name + "_debug";
}
return name;
......
......@@ -18,14 +18,14 @@ QtcProduct {
var flags = base;
if (qbs.buildVariant == "debug" && qbs.toolchain.contains("msvc"))
flags.push("/INCREMENTAL:NO"); // Speed up startup time when debugging with cdb
if (qbs.targetOS.contains("osx"))
if (qbs.targetOS.contains("macos"))
flags.push("-compatibility_version", qtc.qtcreator_compat_version);
return flags;
}
cpp.sonamePrefix: qbs.targetOS.contains("osx")
cpp.sonamePrefix: qbs.targetOS.contains("macos")
? "@rpath"
: undefined
cpp.rpaths: qbs.targetOS.contains("osx")
cpp.rpaths: qbs.targetOS.contains("macos")
? ["@loader_path/../Frameworks"]
: ["$ORIGIN", "$ORIGIN/.."]
property string libIncludeBase: ".." // #include <lib/header.h>
......
......@@ -27,17 +27,17 @@ QtcProduct {
cpp.internalVersion: ""
cpp.defines: base.concat([name.toUpperCase() + "_LIBRARY"])
cpp.sonamePrefix: qbs.targetOS.contains("osx")
cpp.sonamePrefix: qbs.targetOS.contains("macos")
? "@rpath"
: undefined
cpp.rpaths: qbs.targetOS.contains("osx")
cpp.rpaths: qbs.targetOS.contains("macos")
? ["@loader_path/../Frameworks", "@loader_path/../PlugIns"]
: ["$ORIGIN", "$ORIGIN/.."]
cpp.linkerFlags: {
var flags = base;
if (qbs.buildVariant == "debug" && qbs.toolchain.contains("msvc"))
flags.push("/INCREMENTAL:NO"); // Speed up startup time when debugging with cdb
if (qbs.targetOS.contains("osx"))
if (qbs.targetOS.contains("macos"))
flags.push("-compatibility_version", qtc.qtcreator_compat_version);
return flags;
}
......
......@@ -12,7 +12,7 @@ QtcProduct {
'/' + qtc.ide_library_path);
var relativePathToPlugins = FileInfo.relativePath('/' + qtc.ide_libexec_path,
'/' + qtc.ide_plugin_path);
var prefix = qbs.targetOS.contains("osx") ? "@executable_path" : "$ORIGIN";
var prefix = qbs.targetOS.contains("macos") ? "@executable_path" : "$ORIGIN";
return [
FileInfo.joinPaths(prefix, relativePathToLibs),
FileInfo.joinPaths(prefix, relativePathToPlugins)
......
......@@ -8,7 +8,7 @@ Module {
property bool enableProjectFileUpdates: true
property bool installApiHeaders: false
property string libInstallDir: qtc.ide_library_path
property stringList libRPaths: qbs.targetOS.contains("osx")
property stringList libRPaths: qbs.targetOS.contains("macos")
? ["@loader_path/" + FileInfo.relativePath('/' + appInstallDir, '/' + libInstallDir)]
: ["$ORIGIN/..", "$ORIGIN/../" + qtc.ide_library_path]
property string resourcesInstallDir: qtc.ide_data_path + "/qbs"
......
......@@ -16,10 +16,10 @@ Module {
+ ide_compat_version_minor + '.' + ide_compat_version_release
property string libDirName: "lib"
property string ide_app_path: qbs.targetOS.contains("osx") ? "" : "bin"
property string ide_app_target: qbs.targetOS.contains("osx") ? "Qt Creator" : "qtcreator"
property string ide_app_path: qbs.targetOS.contains("macos") ? "" : "bin"
property string ide_app_target: qbs.targetOS.contains("macos") ? "Qt Creator" : "qtcreator"
property string ide_library_path: {
if (qbs.targetOS.contains("osx"))
if (qbs.targetOS.contains("macos"))
return ide_app_target + ".app/Contents/Frameworks"
else if (qbs.targetOS.contains("windows"))
return ide_app_path
......@@ -27,24 +27,24 @@ Module {
return libDirName + "/qtcreator"
}
property string ide_plugin_path: {
if (qbs.targetOS.contains("osx"))
if (qbs.targetOS.contains("macos"))
return ide_app_target + ".app/Contents/PlugIns"
else if (qbs.targetOS.contains("windows"))
return libDirName + "/qtcreator/plugins"
else
return ide_library_path + "/plugins"
}
property string ide_data_path: qbs.targetOS.contains("osx")
property string ide_data_path: qbs.targetOS.contains("macos")
? ide_app_target + ".app/Contents/Resources"
: "share/qtcreator"
property string ide_libexec_path: qbs.targetOS.contains("osx")
property string ide_libexec_path: qbs.targetOS.contains("macos")
? ide_data_path : qbs.targetOS.contains("windows")
? ide_app_path
: "libexec/qtcreator"
property string ide_bin_path: qbs.targetOS.contains("osx")
property string ide_bin_path: qbs.targetOS.contains("macos")
? ide_app_target + ".app/Contents/MacOS"
: ide_app_path
property string ide_doc_path: qbs.targetOS.contains("osx")
property string ide_doc_path: qbs.targetOS.contains("macos")
? ide_data_path + "/doc"
: "share/doc/qtcreator"
property string ide_include_path: "include"
......
......@@ -55,7 +55,7 @@ Product {
]
if (qbs.targetOS.contains("windows"))
list.push("notepad_win.xml");
else if (qbs.targetOS.contains("osx"))
else if (qbs.targetOS.contains("macos"))
list.push("vi_mac.xml");
else
list.push("vi.xml");
......
......@@ -2,10 +2,10 @@ import qbs
QtcProduct {
Depends { name: "bundle" }
Depends { name: "ib"; condition: qbs.targetOS.contains("osx") }
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
Properties {
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
ib.appIconName: "qtcreator"
}
......@@ -23,7 +23,7 @@ QtcProduct {
installDir: qtc.ide_bin_path
property bool qtcRunnable: true
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/../Frameworks"]
cpp.rpaths: qbs.targetOS.contains("macos") ? ["@executable_path/../Frameworks"]
: ["$ORIGIN/../" + qtc.libDirName + "/qtcreator"]
cpp.includePaths: [
project.sharedSourcesDir + "/qtsingleapplication",
......@@ -51,7 +51,7 @@ QtcProduct {
Group {
name: "qtcreator.sh"
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
files: "../../bin/qtcreator.sh"
qbs.install: true
qbs.installDir: "bin"
......@@ -74,7 +74,7 @@ QtcProduct {
}
Group {
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
fileTagsFilter: ["aggregate_infoplist", "pkginfo", "compiled_assetcatalog"]
qbs.install: true
qbs.installSourceBase: product.buildDirectory
......
......@@ -69,7 +69,7 @@ Project {
result.push("advapi32", "user32")
else if (qbs.targetOS.contains("linux"))
result.push("rt", "dl");
else if (qbs.targetOS.contains("osx"))
else if (qbs.targetOS.contains("macos"))
result.push("dl");
else if (qbs.targetOS.contains("unix"))
result.push("rt");
......@@ -95,7 +95,7 @@ Project {
"BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM",
"BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW",
"BOTAN_HAS_ENTROPY_SRC_UNIX", "BOTAN_HAS_MUTEX_PTHREAD", "BOTAN_HAS_PIPE_UNIXFD_IO")
if (qbs.targetOS.contains("osx"))
if (qbs.targetOS.contains("macos"))
result.push("BOTAN_TARGET_OS_IS_DARWIN", "BOTAN_TARGET_OS_HAS_GETTIMEOFDAY",
"BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM",
"BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW",
......
......@@ -18,7 +18,7 @@ Project {
if (qbs.targetOS.contains("windows")) {
libs.push("user32", "iphlpapi", "ws2_32", "shell32");
} else if (qbs.targetOS.contains("unix")) {
if (!qbs.targetOS.contains("osx"))
if (!qbs.targetOS.contains("macos"))
libs.push("X11");
if (!qbs.targetOS.contains("openbsd"))
libs.push("pthread");
......@@ -29,7 +29,7 @@ Project {
cpp.enableExceptions: true
Properties {
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
cpp.frameworks: ["Foundation"]
}
......@@ -278,7 +278,7 @@ Project {
Group {
name: "FileUtils_osx"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
files: [
"fileutils_mac.h", "fileutils_mac.mm",
]
......
......@@ -3,7 +3,7 @@ import qbs 1.0
QtcPlugin {
name: "ClearCase"
pluginJsonReplacements: ({"CLEARCASE_DISABLED_STR": (qbs.targetOS.contains("osx") ? "true": "false")})
pluginJsonReplacements: ({"CLEARCASE_DISABLED_STR": (qbs.targetOS.contains("macos") ? "true": "false")})
Depends { name: "Qt.widgets" }
Depends { name: "Utils" }
......
......@@ -27,7 +27,7 @@ Project {
return ["ole32", "user32"]
}
cpp.frameworks: qbs.targetOS.contains("osx") ? ["AppKit"] : undefined
cpp.frameworks: qbs.targetOS.contains("macos") ? ["AppKit"] : undefined
Group {
name: "General"
......@@ -176,7 +176,7 @@ Project {
Group {
name: "ProgressManager_mac"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
files: [
"progressmanager/progressmanager_mac.mm",
]
......@@ -184,7 +184,7 @@ Project {
Group {
name: "ProgressManager_x11"
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
files: [
"progressmanager/progressmanager_x11.cpp",
]
......@@ -288,7 +288,7 @@ Project {
Group {
name: "Locator_mac"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
files: [
"locator/spotlightlocatorfilter.h",
"locator/spotlightlocatorfilter.mm",
......
......@@ -11,7 +11,7 @@ QtcPlugin {
Depends { name: "QmlDebug" }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
cpp.frameworks: base.concat(qbs.targetOS.contains("osx") ? ["CoreFoundation", "IOKit"] : [])
cpp.frameworks: base.concat(qbs.targetOS.contains("macos") ? ["CoreFoundation", "IOKit"] : [])
files: [
"ios.qrc",
......
......@@ -17,7 +17,7 @@ Project {
cpp.defines: base.concat("QTC_CPU=X86Architecture")
Properties {
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
cpp.frameworks: base.concat(["Carbon"])
}
......
......@@ -4,7 +4,7 @@ QtcProduct {
name: "componentsplugin"
type: ["dynamiclibrary"]
installDir: qtc.ide_plugin_path + '/' + installDirName
property string installDirName: qbs.targetOS.contains("osx") ? "QmlDesigner" : "qmldesigner"
property string installDirName: qbs.targetOS.contains("macos") ? "QmlDesigner" : "qmldesigner"
Depends { name: "Core" }
Depends { name: "QmlDesigner" }
......
......@@ -4,7 +4,7 @@ QtcProduct {
name: "qtquickplugin"
type: ["dynamiclibrary"]
installDir: qtc.ide_plugin_path + '/' + installDirName
property string installDirName: qbs.targetOS.contains("osx") ? "QmlDesigner" : "qmldesigner"
property string installDirName: qbs.targetOS.contains("macos") ? "QmlDesigner" : "qmldesigner"
cpp.defines: base.concat("QTQUICK_LIBRARY")
cpp.includePaths: base.concat("../designercore/include")
......
......@@ -2,7 +2,7 @@ import qbs 1.0
QtcTool {
name: "iossim"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
Depends { name: "bundle" }
Depends { name: "Qt"; submodules: ["widgets"] }
......
......@@ -4,7 +4,7 @@ import QtcTool
QtcTool {
name: "iossim"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
Depends { name: "Qt"; submodules: ["widgets"] }
Depends { name: "app_version_header" }
......
......@@ -24,7 +24,7 @@ QtcTool {
cpp.rpaths: base.concat(libclang.llvmLibDir)
Properties {
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos")
cpp.linkerFlags: base.concat(["-z", "origin"])
}
}
......@@ -2,7 +2,7 @@ import qbs 1.0
QtcTool {
name: "iostool"
condition: qbs.targetOS.contains("osx")
condition: qbs.targetOS.contains("macos")
Depends { name: "bundle" }
Depends { name: "Qt.widgets" }
......
......@@ -3,7 +3,7 @@ import QtcFunctions
QtcTool {
name: "qml2puppet"
installDir: qbs.targetOS.contains("osx")
installDir: qbs.targetOS.contains("macos")
? qtc.ide_libexec_path + "/qmldesigner" : qtc.ide_libexec_path
Depends { name: "bundle" }
......
......@@ -7,7 +7,7 @@ QtcTool {
Depends { name: "Utils" }
Depends { name: "app_version_header" }
cpp.defines: base.concat([qbs.targetOS.contains("osx")
cpp.defines: base.concat([qbs.targetOS.contains("macos")
? 'DATA_PATH="."'
: qbs.targetOS.contains("windows") ? 'DATA_PATH="../share/qtcreator"'
: 'DATA_PATH="../../share/qtcreator"'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment