summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2014-08-22 17:53:05 +0200
committerZeno Albisser <zeno.albisser@digia.com>2014-08-26 21:58:27 +0200
commit085aa0d44337e468595b74dd691c29a41d7a4f56 (patch)
tree2bd517e5821d73cf6db586445c86ad8caad71544
parentf9c1fb9a88144aa546879085f74eb701651b9593 (diff)
When comparing paths in python we have to use normcase.
Chromium requires relative paths for output-dir and for generator-output. Also output-dir is expected to be a subdirectory of generator-output. This now allows building on windows without running qmake in recursive mode. Change-Id: Ie0f9965c1fbfd63eb3cb9c360b29f210128a5c3e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine8
-rwxr-xr-xtools/buildscripts/qtwebengine_utils.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index 3c746199..e3fb740c 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -11,7 +11,7 @@ if sys.platform == "darwin":
print 'xcode version: ' + subprocess.check_output(['xcodebuild', '-version']).replace('\n', ' ')
print 'clang++ version: ' + subprocess.check_output(['clang++', '--version']).replace('\n', ' ')
-qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
+qtwebengine_root = os.path.normcase(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
import qtwebengine_utils as utils
chrome_src = utils.getChromiumSrcDir()
@@ -19,7 +19,7 @@ script_dir = os.path.abspath(os.path.join(chrome_src, 'build'))
if not os.path.isdir(script_dir):
print script_dir + " is not a valid directory"
sys.exit(1)
-root_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir, os.pardir))
+root_dir = os.path.normcase(os.path.abspath(os.path.join(os.getcwd(), os.pardir, os.pardir)))
sys.path.insert(1, script_dir)
import gyp_helper
@@ -145,8 +145,8 @@ if __name__ == '__main__':
# Trigger Qt-specific build conditions.
args.extend(['-D', 'use_qt=1'])
# Tweak the output location and format (hardcode ninja for now if not set)
- args.extend(['--generator-output', os.path.abspath(output_dir)])
- args.extend(['-Goutput_dir='+ os.path.abspath(output_dir)])
+ args.extend(['--generator-output', '.'])
+ args.extend(['-Goutput_dir='+ os.path.relpath(output_dir, qtwebengine_root)])
# Tell gyp not to try finding cl.exe on Windows, Qt already requires the env to be set prior to the build.
args.extend(['-G', 'ninja_use_custom_environment_files'])
diff --git a/tools/buildscripts/qtwebengine_utils.py b/tools/buildscripts/qtwebengine_utils.py
index 1b629c65..ccc112b1 100755
--- a/tools/buildscripts/qtwebengine_utils.py
+++ b/tools/buildscripts/qtwebengine_utils.py
@@ -62,5 +62,5 @@ def getChromiumSrcDir():
print('Using external chromium sources specified in git config qtwebengine.chromiumsrcdir: ' + chrome_src)
if not chrome_src or not os.path.isdir(chrome_src):
chrome_src = os.path.normpath(os.path.join(qtwebengine_root, 'src/3rdparty/chromium'))
- return chrome_src
+ return os.path.normcase(chrome_src)