summaryrefslogtreecommitdiff
path: root/src/lib/cross.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-09 10:59:33 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-09 10:59:33 +0100
commit7bbcb5240103b4ab19a7b35cd888dd25cf56aad1 (patch)
treed4bc99a86773ed49ec38d38029f360c1dcddc1f8 /src/lib/cross.cc
parentabf7799a1997c6519c04e6488f39553d92c5df16 (diff)
Try to fix openssl use on Windows.
Diffstat (limited to 'src/lib/cross.cc')
-rw-r--r--src/lib/cross.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 61ec8de5e..47b97baec 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -231,3 +231,22 @@ mount_info ()
return m;
}
+
+boost::filesystem::path
+openssl_path ()
+{
+#ifdef DCPOMATIC_WINDOWS
+
+ wchar_t dir[512];
+ GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
+ PathRemoveFileSpec (dir);
+
+ boost::filesystem::path path = dir;
+ path /= "openssl.exe";
+ return path
+#else
+ /* We assume that it's on the path for Linux and OS X */
+ return "openssl";
+#endif
+
+}