diff options
author | Robin Gareus <robin@gareus.org> | 2014-03-04 15:25:58 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-03-04 15:25:58 +0100 |
commit | 912f07b919c1ec44f0cdd5278d74a9bc29b91846 (patch) | |
tree | 1cd5f158ada5e8b9b73cf0d52ca5f9fa430c1fe9 /libs/fst | |
parent | 3e250d5f0649256c8e4c7c53da4f67383dd52f78 (diff) |
mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64)
Diffstat (limited to 'libs/fst')
-rw-r--r-- | libs/fst/scanner.cc | 4 | ||||
-rw-r--r-- | libs/fst/vstwin.c | 8 | ||||
-rw-r--r-- | libs/fst/wscript | 14 |
3 files changed, 20 insertions, 6 deletions
diff --git a/libs/fst/scanner.cc b/libs/fst/scanner.cc index ca95b25471..99177b51db 100644 --- a/libs/fst/scanner.cc +++ b/libs/fst/scanner.cc @@ -4,7 +4,9 @@ #include <vector> #include "ardour/filesystem_paths.h" +#ifdef LXVST_SUPPORT #include "ardour/linux_vst_support.h" +#endif #include "ardour/vst_info_file.h" /* make stupid waf happy. @@ -16,7 +18,9 @@ * ...but waf does track include dependencies. */ #include "../ardour/vst_info_file.cc" +#ifdef LXVST_SUPPORT #include "../ardour/linux_vst_support.cc" +#endif #include "../ardour/filesystem_paths.cc" #include "../ardour/directory_names.cc" #include "../pbd/error.cc" diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index d37c5dffbb..4c4e2888f5 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -4,9 +4,9 @@ #ifdef PLATFORM_WINDOWS -#include <ardourext/misc.h> -#include <ardourext/pthread.h> +#include <pthread.h> static UINT_PTR idle_timer_id = 0; +extern char *basename(char *path); #else /* linux + wine */ @@ -116,9 +116,9 @@ idle_hands( } } + pthread_mutex_lock (&fst->lock); #ifndef PLATFORM_WINDOWS /* linux + wine */ /* Dispatch messages to send keypresses to the plugin */ - pthread_mutex_lock (&fst->lock); int i; for (i = 0; i < fst->n_pending_keys; ++i) { @@ -141,6 +141,7 @@ idle_hands( } fst->n_pending_keys = 0; +#endif /* See comment for maybe_set_program call below */ maybe_set_program (fst); @@ -158,7 +159,6 @@ idle_hands( maybe_set_program (fst); fst->program_set_without_editor = 1; } -#endif pthread_mutex_unlock (&fst->lock); } diff --git a/libs/fst/wscript b/libs/fst/wscript index e15613d9c0..44ff9a8128 100644 --- a/libs/fst/wscript +++ b/libs/fst/wscript @@ -27,6 +27,11 @@ def configure(conf): conf.load('misc') conf.load('compiler_cxx') autowaf.configure(conf) + if conf.env['WINDOWS_VST_SUPPORT'] == True and bld.env['build_target'] == 'mingw': + conf.check(compiler='cxx', + lib='gdi32', + mandatory=True, + uselib_store='GDI32') # Add a waf `feature' to allow compilation of things using winegcc from waflib.TaskGen import feature @@ -59,9 +64,15 @@ def build(bld): ) obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] obj.target = 'ardour-vst-scanner.exe.so' + obj.uselib = ['GIOMM', 'DL'] else: obj = bld (features = 'cxx c cxxprogram') - obj.source = ( 'scanner.cc' ) + if bld.is_defined('WINDOWS_VST_SUPPORT'): + obj.source = ( 'scanner.cc', 'fst.c', 'vstwin.c' ) + obj.uselib = ['GIOMM', 'DL', 'GDI32'] + else: + obj.source = ( 'scanner.cc' ) + obj.uselib = ['GIOMM', 'DL'] obj.target = 'ardour-vst-scanner' obj.includes = [ '../pbd/', '../ardour/', '.' ] @@ -72,4 +83,3 @@ def build(bld): 'PACKAGE="' + I18N_PACKAGE + '"', ] obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst') - obj.uselib = ['GIOMM', 'DL'] |