Last active
August 29, 2015 13:56
-
-
Save azbesthu/9072140 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/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro | |
index 53ce2db..fffdeb2 100644 | |
--- a/src/core/core_gyp_generator.pro | |
+++ b/src/core/core_gyp_generator.pro | |
@@ -104,6 +104,13 @@ load(resolve_target) | |
TARGET_NAME = $$basename(QMAKE_RESOLVED_TARGET) | |
TARGET_NAME = $$replace(TARGET_NAME, .$${VERSION},) | |
+win32 { | |
+# Copy library to the location where other projects are looking for it. | |
+# Change lib's filename to the expected one. | |
+QMAKE_POST_LINK += $${QMAKE_COPY} $$system_path($$getOutDir()/$$getConfigDir()/$$TARGET_NAME) $$system_path($$ge | |
+QMAKE_POST_LINK += $${QMAKE_COPY} $$system_path($$getOutDir()/$$getConfigDir()/$${TARGET_NAME}.lib) $$system_pat | |
+} | |
+ | |
target.files = $$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME | |
target.CONFIG += no_check_exist # Trust us, qmake... | |
target.path = $$[QT_INSTALL_LIBS] | |
így: | |
# Hardlink library to the location where other projects looking for it. | |
!build_pass|win32 { | |
QMAKE_POST_LINK += if exist $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGET}.*) del $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGET}.*)$$escape_expand(\\n\\t) | |
QMAKE_POST_LINK += mklink /H $$system_path($$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME) $$system_path($$getOutDir()/$$getConfigDir()/$$TARGET_NAME)$$escape_expand(\\n\\t) | |
QMAKE_POST_LINK += mklink /H $$system_path($$getOutDir()/$$getConfigDir()/lib/$${TARGET}.lib) $$system_path($$getOutDir()/$$getConfigDir()/$${TARGET_NAME}.lib) | |
} | |
macx:QMAKE_POST_LINK += ln -f $$getOutDir()/$$getConfigDir()/$$TARGET_NAME $$getOutDir()/$$getConfigDir()/lib/$$TARGET_NAME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment