Add DCPOMATIC_DISK define and don't build stuff needing boost dll library if we don... v2.15.49
authorCarl Hetherington <cth@carlh.net>
Mon, 6 Apr 2020 23:29:50 +0000 (01:29 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Apr 2020 23:29:50 +0000 (01:29 +0200)
src/lib/cross.h
src/lib/cross_linux.cc
src/lib/cross_osx.cc
src/lib/cross_windows.cc
wscript

index 20bab38a29e7296f8a52130cfd204aa56a417efd..6d3c2bd2ea17a8c1d346f2ead2a02642df289df7 100644 (file)
@@ -45,7 +45,9 @@ extern std::string cpu_info ();
 extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path);
 extern std::list<std::pair<std::string, std::string> > mount_info ();
 extern boost::filesystem::path openssl_path ();
+#ifdef DCPOMATIC_DISK
 extern boost::filesystem::path disk_writer_path ();
+#endif
 #ifdef DCPOMATIC_OSX
 extern boost::filesystem::path app_contents ();
 #endif
index 4060879178947e344ae6932808ab25a8bd55fbd6..8c81c50081470353fd508aeb2fdc75c237a1a6f7 100644 (file)
@@ -31,7 +31,9 @@ extern "C" {
 }
 #include <boost/algorithm/string.hpp>
 #include <boost/foreach.hpp>
+#ifdef DCPOMATIC_DISK
 #include <boost/dll/runtime_symbol_info.hpp>
+#endif
 #include <unistd.h>
 #include <mntent.h>
 #include <sys/types.h>
@@ -140,11 +142,13 @@ openssl_path ()
        return "dcpomatic2_openssl";
 }
 
+#ifdef DCPOMATIC_DISK
 boost::filesystem::path
 disk_writer_path ()
 {
        return boost::dll::program_location().parent_path() / "dcpomatic2_disk_writer";
 }
+#endif
 
 /* Apparently there is no way to create an ofstream using a UTF-8
    filename under Windows.  We are hence reduced to using fopen
index fa12fb38003f5d1caf35fd3ec9ba7aab4954d572..481edad0d7cb117dea264555d527633886f457cd 100644 (file)
@@ -131,6 +131,7 @@ openssl_path ()
        return path;
 }
 
+#ifdef DCPOMATIC_DISK
 boost::filesystem::path
 disk_writer_path ()
 {
@@ -139,6 +140,7 @@ disk_writer_path ()
        path /= "dcpomatic2_disk_writer";
        return path;
 }
+#endif
 
 /* Apparently there is no way to create an ofstream using a UTF-8
    filename under Windows.  We are hence reduced to using fopen
index 130086898abcd3ebb81f1932f9019ca58c8f2d21..f55e0a9c23cddaeea6f72553819c93ea207705b1 100644 (file)
@@ -198,11 +198,13 @@ openssl_path ()
        return executable_path() / "openssl.exe";
 }
 
+#ifdef DCPOMATIC_DISK
 boost::filesystem::path
 disk_writer_path ()
 {
        return executable_path() / "dcpomatic2_disk_writer.exe";
 }
+#endif
 
 /* Apparently there is no way to create an ofstream using a UTF-8
    filename under Windows.  We are hence reduced to using fopen
diff --git a/wscript b/wscript
index a94fee8bae830ee8985275671cbcfbb5d96785dd..c386ed21d5469811f209d14e735ede61bb59cbbc 100644 (file)
--- a/wscript
+++ b/wscript
@@ -74,7 +74,7 @@ def options(opt):
     opt.add_option('--force-cpp11',       action='store_true', default=False, help='force use of C++11')
     opt.add_option('--variant',           help='build variant (swaroop-studio, swaroop-theater)', choices=['swaroop-studio', 'swaroop-theater'])
     opt.add_option('--use-lld',           action='store_true', default=False, help='use lld linker')
-    opt.add_option('--enable-disk',       action='store_true', default=False, help='build dcpomatic2_disk tool; requires Boost process and lwext4 libraries')
+    opt.add_option('--enable-disk',       action='store_true', default=False, help='build dcpomatic2_disk tool; requires Boost process, lwext4 and nanomsg libraries')
 
 def configure(conf):
     conf.load('compiler_cxx')
@@ -135,6 +135,9 @@ def configure(conf):
         if conf.options.variant.startswith('swaroop-'):
             conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_SWAROOP')
 
+    if conf.options.enable_disk:
+        conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_DISK')
+
     if conf.options.use_lld:
         try:
             conf.find_program('ld.lld')