Created
February 19, 2014 02:11
-
-
Save azbesthu/9084818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf | |
index 20cde1d..1366244 100644 | |
--- a/tools/qmake/mkspecs/features/gyp_generator.prf | |
+++ b/tools/qmake/mkspecs/features/gyp_generator.prf | |
@@ -164,10 +164,40 @@ GYP_CONTENTS += " ]," | |
GYP_CONTENTS += " 'actions': [" | |
for(resourcefile, RESOURCES): GYP_CONTENTS += $$rccAction($$resourcefile) | |
for(header, MOCABLE_HEADERS): GYP_CONTENTS += $$mocAction($$header) | |
-GYP_CONTENTS += " ]," \ | |
- " }," | |
+GYP_CONTENTS += " ]," | |
+#GYP_CONTENTS += " ]," \ | |
+# " }," | |
+macx { | |
+# hardlink for macx | |
+# macx:QMAKE_POST_LINK += ln -f $$getOutDir()/$$getConfigDir()/$$TARGET_NAME $$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME | |
+} | |
+win32 { | |
+# hardlink for win32, ninja calles cygwin that wraps ln to mklink | |
+GYP_CONTENTS += " 'postbuilds': [" \ | |
+ " {" \ | |
+ " 'postbuild_name':'hardlink $$TARGET dll'," \ | |
+ " 'action': [" \ | |
+ " 'ln'," \ | |
+ " '-f'," \ | |
+ " '$$clean_path($$getOutDir()/$$getConfigDir()/$$TARGET_NAME)'," \ | |
+ " '$$clean_path($$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME)'," \ | |
+ " ]," \ | |
+ " }," \ | |
+ " {" \ | |
+ " 'postbuild_name':'hardlink $$TARGET lib'," \ | |
+ " 'action': [" \ | |
+ " 'ln'," \ | |
+ " '-f'," \ | |
+ " '$$clean_path($$getOutDir()/$$getConfigDir()/$${TARGET_NAME}.lib)'," \ | |
+ " '$$clean_path($$getOutDir()/$$getConfigDir()/lib/$${TARGET}.lib)'," \ | |
+ " ]," \ | |
+ " }," \ | |
+ " ]," | |
+ | |
+} | |
-GYP_CONTENTS += " ]," \ | |
+GYP_CONTENTS += " }," \ | |
+ " ]," \ | |
"}" | |
!build_pass: write_file($$GYPFILE, GYP_CONTENTS) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment