Last active
August 29, 2015 13:56
-
-
Save azbesthu/9083774 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
$ git diff . | |
diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf | |
index 20cde1d..ed87270 100644 | |
--- a/tools/qmake/mkspecs/features/gyp_generator.prf | |
+++ b/tools/qmake/mkspecs/features/gyp_generator.prf | |
@@ -166,6 +166,42 @@ for(resourcefile, RESOURCES): GYP_CONTENTS += $$rccAction($$resourcefile) | |
for(header, MOCABLE_HEADERS): GYP_CONTENTS += $$mocAction($$header) | |
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 += " {" \ | |
+ " 'target_name': '$${TARGET}_hardlink'," \ | |
+ " 'type': 'none'," \ | |
+ " 'dependencies': ['$$TARGET']," \ | |
+ " 'actions': [" \ | |
+ " {" \ | |
+ " 'action_name':'hardlink $$TARGET dll'," \ | |
+ " 'inputs': ['$$clean_path($$getOutDir()/$$getConfigDir()/$$TARGET_NAME)',]," \ | |
+ " 'outputs': ['$$clean_path($$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME)',]," \ | |
+ " 'action': [" \ | |
+ " 'ln'," \ | |
+ " '-f'," \ | |
+ " '<@(_inputs)'," \ | |
+ " '<@(_outputs)'," \ | |
+ " ]," \ | |
+ " }," \ | |
+ " {" \ | |
+ " 'action_name':'hardlink $$TARGET lib'," \ | |
+ " 'inputs': ['$$clean_path($$getOutDir()/$$getConfigDir()/$${TARGET_NAME}.lib)',]," \ | |
+ " 'outputs': ['$$clean_path($$getOutDir()/$$getConfigDir()/lib/$${TARGET}.lib)',]," \ | |
+ " 'action': [" \ | |
+ " 'ln'," \ | |
+ " '-f'," \ | |
+ " '<@(_inputs)'," \ | |
+ " '<@(_outputs)'," \ | |
+ " ]," \ | |
+ " }," \ | |
+ " ]," \ | |
+ " }," | |
+} | |
GYP_CONTENTS += " ]," \ | |
"}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment