Use PLATFORM_WINDOWS (in preference to WIN32) for consistency with the other libraries
[ardour.git] / libs / fst / wscript
index 44ff9a812814037d3b87a4400a50f8caa0ab0d93..91273f3d793b7e02d8ad8947cde201aaa626f8e4 100644 (file)
@@ -27,7 +27,7 @@ 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':
+    if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw':
         conf.check(compiler='cxx',
                    lib='gdi32',
                    mandatory=True,
@@ -51,7 +51,7 @@ def build(bld):
         obj.source = 'scanner.wine'
         obj.target = 'ardour-vst-scanner'
         obj.chmod  = Utils.O755
-        obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst')
+        obj.install_path = os.path.join(bld.env['LIBDIR'], 'fst')
         obj.dict   = {
             'VERSION' : bld.env['VERSION'],
                 }
@@ -59,21 +59,22 @@ def build(bld):
         obj = bld (features = 'c cxx cxxprogram wine')
         obj.source = (
             'scanner.cc',
-            'fst.c',
             'vstwin.c',
             )
         obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
         obj.target = 'ardour-vst-scanner.exe.so'
         obj.uselib = ['GIOMM', 'DL']
+        obj.use = [ 'libpbd' ]
     else:
         obj = bld (features = 'cxx c cxxprogram')
         if bld.is_defined('WINDOWS_VST_SUPPORT'):
-            obj.source = ( 'scanner.cc', 'fst.c', 'vstwin.c' )
+            obj.source = ( 'scanner.cc', 'vstwin.c' )
             obj.uselib = ['GIOMM', 'DL', 'GDI32']
         else:
             obj.source = ( 'scanner.cc' )
             obj.uselib = ['GIOMM', 'DL']
         obj.target = 'ardour-vst-scanner'
+        obj.use = [ 'libpbd' ]
 
     obj.includes  = [ '../pbd/', '../ardour/', '.' ]
     obj.defines = [
@@ -82,4 +83,4 @@ def build(bld):
         'VST_SCANNER_APP',
         'PACKAGE="' + I18N_PACKAGE + '"',
         ]
-    obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst')
+    obj.install_path = os.path.join(bld.env['LIBDIR'], 'fst')