aboutsummaryrefslogtreecommitdiffstats
path: root/examples/install-bundle
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-05-04 04:46:45 -0700
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-04 11:48:46 +0000
commit9bb5e477ef919ec469d74dd8aa4bb77a2bb2a18e (patch)
tree36de9bb21a4ee3f7f34ffb240895932673c093fa /examples/install-bundle
parentd2aa95c50c6b884905ed93484f4d3b0b39ef68c5 (diff)
Fix installed bundle example to work well on Windows.
Change-Id: I382a6a91f41dab1dc9ff8769c4875b6d2f050520 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'examples/install-bundle')
-rw-r--r--examples/install-bundle/coreutils.cpp2
-rw-r--r--examples/install-bundle/coreutils.h3
-rw-r--r--examples/install-bundle/install-bundle.qbs8
3 files changed, 9 insertions, 4 deletions
diff --git a/examples/install-bundle/coreutils.cpp b/examples/install-bundle/coreutils.cpp
index 9010bb0f6..f66904af7 100644
--- a/examples/install-bundle/coreutils.cpp
+++ b/examples/install-bundle/coreutils.cpp
@@ -1,3 +1,5 @@
+#include "coreutils.h"
+
int foo()
{
return 42;
diff --git a/examples/install-bundle/coreutils.h b/examples/install-bundle/coreutils.h
index 5d5f8f0c9..e12e23c49 100644
--- a/examples/install-bundle/coreutils.h
+++ b/examples/install-bundle/coreutils.h
@@ -1 +1,4 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
int foo();
diff --git a/examples/install-bundle/install-bundle.qbs b/examples/install-bundle/install-bundle.qbs
index 660b77a66..b13028582 100644
--- a/examples/install-bundle/install-bundle.qbs
+++ b/examples/install-bundle/install-bundle.qbs
@@ -11,7 +11,7 @@ Project {
files: ["main.cpp"]
property bool install: true
- property string installDir: bundle.isBundle ? "Applications" : "bin"
+ property string installDir: bundle.isBundle ? "Applications" : (qbs.targetOS.contains("windows") ? "" : "bin")
Group {
fileTagsFilter: ["application"]
@@ -37,13 +37,13 @@ Project {
name: "coreutils"
targetName: bundle.isBundle ? "CoreUtils" : "coreutils"
- files: ["coreutils.cpp"]
+ files: ["coreutils.cpp", "coreutils.h"]
property bool install: true
- property string installDir: bundle.isBundle ? "Library/Frameworks" : "lib"
+ property string installDir: bundle.isBundle ? "Library/Frameworks" : (qbs.targetOS.contains("windows") ? "" : "lib")
Group {
- fileTagsFilter: ["dynamiclibrary", "dynamiclibrary_symlink"]
+ fileTagsFilter: ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_import"]
qbs.install: install
qbs.installDir: bundle.isBundle ? FileInfo.joinPaths(installDir, FileInfo.path(bundle.executablePath)) : installDir
}