diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-01 15:54:16 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-07-27 15:19:49 +0000 |
commit | b6a0cd76dbb29e288bb041aca3125801126f8810 (patch) | |
tree | f732665e9f9368adf787926798a7f2a44b669e32 /tools | |
parent | 808ca6e6917cf17e4c30fcd3ac609164b36594cc (diff) |
Move core_generated.gyp to build directory
Changes core_generated.gyp from being generated in the source directory
to being generated in the build directory.
Task-number: QTBUG-43014
Change-Id: Ia67df47bfadbf5dfca6e60a613dcf7b162b468fd
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/buildscripts/gyp_qtwebengine | 5 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/gyp_generator.prf | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine index ee09de973..d6f12ee2f 100755 --- a/tools/buildscripts/gyp_qtwebengine +++ b/tools/buildscripts/gyp_qtwebengine @@ -108,7 +108,8 @@ if __name__ == '__main__': break if not gyp_file_specified: - args.append(os.path.join(root_dir, 'src/core/core.gyp')) + args.append(os.path.join(root_dir, 'src/core/resources/resources.gyp')) + args.append(os.path.join(output_dir, 'core_generated.gyp')) args.extend(['-I' + i for i in additional_include_files(args)]) @@ -155,7 +156,7 @@ if __name__ == '__main__': # Tweak the output location and format (hardcode ninja for now if not set) args.extend(['--generator-output', '.']) - args.extend(['-Goutput_dir='+ os.path.relpath(output_dir, qtwebengine_root)]) + args.extend(['-Goutput_dir='+ purifyGypVarPath(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/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index eea11ef09..b2be1bb2c 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -6,8 +6,8 @@ load(functions) load(moc) load(resources) -MOC_GEN_DIR = <(SHARED_INTERMEDIATE_DIR)/moc -RCC_GEN_DIR = <(SHARED_INTERMEDIATE_DIR)/rcc +MOC_GEN_DIR = $$MOC_DIR +RCC_GEN_DIR = $$RCC_DIR defineReplace(mocAction) { INPUT_FILE = $$1 @@ -21,11 +21,11 @@ defineReplace(mocAction) { OUTPUT_FILE = $$MOC_GEN_DIR/$${OUTPUT_NAME} contents = " {" \ " 'action_name':'$$OUTPUT_NAME'," \ - " 'inputs': ['$$INPUT_FILE',]," \ + " 'inputs': ['$$GYPSRCDIR//$$INPUT_FILE',]," \ " 'outputs': ['$$OUTPUT_FILE',]," \ " 'action': [" for(token, MOC_COMMAND): contents += " '$$replace(token,\',)'," - contents += " '$$INPUT_FILE'," \ + contents += " '$$GYPSRCDIR/$$INPUT_FILE'," \ " '-o'," \ " '$$OUTPUT_FILE'," \ " ]," \ @@ -42,14 +42,14 @@ defineReplace(rccAction) { CLEAN_QMAKE_RCC = $$clean_path($$QMAKE_RCC) contents = " {" \ " 'action_name':'$$OUTPUT_NAME'," \ - " 'inputs': ['$$INPUT_FILE',]," \ + " 'inputs': ['$$GYPSRCDIR//$$INPUT_FILE',]," \ " 'outputs': ['$$OUTPUT_FILE',]," \ " 'action': [" \ " '$$replace(CLEAN_QMAKE_RCC,\',)'," for(resource_flag, $$QMAKE_RESOURCE_FLAGS): contents += " '$$resource_flag'," contents += " '-name'," \ " '$$EXTERN_FUNC'," \ - " '$$INPUT_FILE'," \ + " '$$GYPSRCDIR/$$INPUT_FILE'," \ " '-o'," \ " '$$OUTPUT_FILE'," contents += " ]," \ @@ -76,6 +76,12 @@ for (incl, GYPINCLUDES): GYP_CONTENTS += " '$$incl'," GYP_CONTENTS += " ]," } +!isEmpty(GYPDEPENDENCIES) { +GYP_CONTENTS += " 'dependencies': [" +for (depend, GYPDEPENDENCIES): GYP_CONTENTS += " '$$depend'," +GYP_CONTENTS += " ]," +} + !isEmpty(QMAKE_FRAMEWORKPATH) { GYP_CONTENTS += " 'mac_framework_dirs': [" for(path, QMAKE_FRAMEWORKPATH): GYP_CONTENTS += " '$$path'," @@ -107,8 +113,8 @@ GYP_CONTENTS += " ]," # Source files to compile GYP_CONTENTS += " 'sources': [" -for (sourcefile, SOURCES): GYP_CONTENTS += " '$$sourcefile'," -for (headerfile, HEADERS): GYP_CONTENTS += " '$$headerfile'," +for (sourcefile, SOURCES): GYP_CONTENTS += " '$$GYPSRCDIR/$$sourcefile'," +for (headerfile, HEADERS): GYP_CONTENTS += " '$$GYPSRCDIR/$$headerfile'," # Add Sources generated by rcc from qrc files. for (resourcefile, RESOURCES) { @@ -128,8 +134,6 @@ for (mocable, MOCABLES) { GYP_CONTENTS += " ]," GYP_CONTENTS += " 'include_dirs': [" for (path, INCLUDEPATH): GYP_CONTENTS += " '$$path'," -# qmake already added MOC_DIR to INCLUDEPATH, but we're telling gyp to use a different one. -GYP_CONTENTS += " '$$MOC_GEN_DIR'," GYP_CONTENTS += " ]," # Generate the actions for moc and rcc |