summaryrefslogtreecommitdiffstats
path: root/src/core/gyp_configure_target.pro
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gyp_configure_target.pro')
-rw-r--r--src/core/gyp_configure_target.pro36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/gyp_configure_target.pro b/src/core/gyp_configure_target.pro
new file mode 100644
index 000000000..6d9f414c3
--- /dev/null
+++ b/src/core/gyp_configure_target.pro
@@ -0,0 +1,36 @@
+# Prevent generating a makefile that attempts to create a lib
+TEMPLATE = aux
+
+TOOLCHAIN_INCLUDES = $${QMAKE_INCDIR_EGL} $${INCLUDEPATH} $${QMAKE_INCDIR}
+
+GYPI_CONTENTS += " ['CC', '$$which($$QMAKE_CC)']," \
+ " ['CXX', '$$which($$QMAKE_CXX)']," \
+ " ['LD', '$$which($$QMAKE_LINK)'],"
+GYPI_CONTENTS += " ]," \
+ " 'target_defaults': {" \
+ " 'target_conditions': [" \
+ " ['_toolset==\"target\"', {" \
+ " 'include_dirs': ["
+for(includes, TOOLCHAIN_INCLUDES) {
+ GYPI_CONTENTS += " '$$includes',"
+}
+GYPI_CONTENTS += " ]," \
+ " 'cflags': ["
+for(cflag, QT_CFLAGS_DBUS) {
+ GYPI_CONTENTS += " '$$cflag',"
+}
+GYPI_CONTENTS += " ]," \
+ " }]," \
+ " ]," \
+ " },"
+
+GYPI_CONTENTS += "}"
+
+GYPI_FILE = $$absolute_path('build/qmake_extras.gypi', $$QTWEBENGINE_ROOT)
+
+!exists($$GYPI_FILE): error("-- $$GYPI not found --")
+
+# Append to the file already containing the host settings.
+!build_pass {
+ write_file($$GYPI_FILE, GYPI_CONTENTS, append)
+}