forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
111 lines (93 loc) · 3.98 KB
/
SConstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# machine-system settings we support
#
# iX86-mingw32-
# iX86-apple-darwin9
# x86_64-apple-darwin9
# powerpc-apple-darwin9
# poperpc64-apple-darwin9
# iX86-linux-gnu
# x86_64-linux-gnu
# platform = [win, osx, bsd, linux]
# machine = [iX86, x86_64, powerpc, powerpc64]
# toolchain = [gnu, msvc]
# target = [debug, release]
# If you don't specify your platform, we autodetect platform/machine using
# python. If you don't specify your machine then we pick iX86 by default
#
# default toolchain: gnu (you'll get an error on Windows if unspecified)
# default build: debug
import logging
logging.getLogger().setLevel(logging.DEBUG)
from build import mixxx, features, depends
target = ARGUMENTS.get('target', None)
machine = ARGUMENTS.get('machine', None)
build_type = ARGUMENTS.get('build', None)
toolchain = ARGUMENTS.get('toolchain', None)
available_features = [features.HifiEq,
features.Mad,
features.CoreAudio,
features.MediaFoundation,
features.HSS1394,
features.HID,
features.Bulk,
features.VinylControl,
features.Shoutcast,
features.Profiling,
features.Tuned,
features.QDebug,
features.Verbose,
features.Optimize,
features.FAAD,
features.WavPack,
features.ModPlug,
features.TestSuite,
features.LADSPA,
features.MSVCDebug,
features.MSVSHacks,
features.Vamp,
features.AutoDjCrates,
# "Features" of dubious quality
features.PerfTools,
features.AsmLib,
features.IPod,
features.FFMPEG,
]
build = mixxx.MixxxBuild(target, machine, build_type,
toolchain, available_features)
Export('build')
# Run our configuration stuff to setup our build environment (detect
# platform/arch, find libraries, etc)
SConscript(File('src/SConscript.env'), variant_dir=Dir(build.build_dir), duplicate=0)
# Grab the list of sources generated by SConscript.env
Import('sources')
# Make the main src directory accessible to the SoundSourceM4A, so
# SoundSourceM4A can get at sounddevice.cpp, which it needs to build
# and link properly. This sucks but it's the best way I can find -- bkgood
VariantDir("plugins/soundsourcem4a", "src", duplicate=0)
VariantDir("plugins/soundsourcewv", "src", duplicate=0)
VariantDir("plugins/soundsourcemediafoundation", "src", duplicate=0)
# Build our soundsource plugins
soundsource_plugins = SConscript(
File('plugins/SConscript'), variant_dir=Dir(build.build_dir + "/plugins"),
duplicate=0, exports=['build'])
#Build Vamp minimal plugins
#VariantDir("vamp-plugins", "src", duplicate=0)
mixxxminimal_depends = [ depends.SoundTouch ]
mixxxminimal_plugins = SConscript(
File('vamp-plugins/SConscript'),
variant_dir=Dir(build.build_dir + "/vamp-plugins"),
duplicate=0, exports=['build', 'mixxxminimal_depends'])
# Setup and build the "mixxx" executable target. Also sets up our install
# targets for each platform.
SConscript(File('src/SConscript'), variant_dir=Dir(build.build_dir), duplicate=0,
exports=['build', 'sources', 'soundsource_plugins', 'mixxxminimal_plugins'])
# For convenience, copy the Mixxx binary out of the build directory to the
# root. Don't do it on windows because the binary can't run on its own and needs
# the DLLs present with it.
if not build.platform_is_windows:
Command("mixxx", os.path.join(build.build_dir, "mixxx"), Copy("$TARGET", "$SOURCE"))
#On OS X, if the bundle has been built, copy it up:
#Command("Mixxx.app", os.path.join(build.build_dir, "Mixxx.app"), Copy("$TARGET", "$SOURCE"))