Skip to content

Instantly share code, notes, and snippets.

@azbesthu
Created February 20, 2014 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azbesthu/9116224 to your computer and use it in GitHub Desktop.
Save azbesthu/9116224 to your computer and use it in GitHub Desktop.
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 9ab8ff6..e88d97a 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -67,8 +67,25 @@ ninja.target = invoke_ninja
ninja.commands = $$findOrBuildNinja() \$\(NINJAFLAGS\) -C $$getOutDir()/$$getConfigDir()
QMAKE_EXTRA_TARGETS += ninja
+handle_lib.target = handle_core_library
+TARGETLIB = Qt5WebEngineCore
+win32 {
+# Gyp-Ninja creates Qt5WebEngineCore.dll and Qt5WebEngineCore.dll.lib in out\{Release|Debug}\ directory.
+handle_lib.commands = "if exist $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGETLIB}.*) del $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGETLIB}.*)$$escape_expand(\\n\\t)" \
+ "mklink /H $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGETLIB}.dll) $$system_path($$getOutDir()/$$getConfigDir()/$${TARGETLIB}.dll)$$escape_expand(\\n\\t)" \
+ "mklink /H $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGETLIB}.lib) $$system_path($$getOutDir()/$$getConfigDir()/$${TARGETLIB}.dll.lib)"
+
+} else: macx {
+# Gyp-Ninja creates Qt5WebEngineCore.so in in out/{Release|Debug}/ directory.
+handle_lib.commands = ln -f $$getOutDir()/$$getConfigDir()/$${TARGETLIB}.so $$getOutDir()/$$getConfigDir()/lib/$${TARGETLIB}.so
+} else {
+# Nothing to do on Linux
+}
+handle_lib.depends = ninja
+QMAKE_EXTRA_TARGETS += handle_lib
+
build_pass:build_all:default_target.target = all
else: default_target.target = first
-default_target.depends = ninja
+default_target.depends = handle_lib
QMAKE_EXTRA_TARGETS += default_target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment