forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SConstruct
99 lines (85 loc) · 3.41 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
#!/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
# target = [windows, osx, bsd, linux]
# machine = [iX86, x86_64, powerpc, powerpc64]
# toolchain = [gnu, msvc]
# build = [debug, release]
# optimize = [off, portable, native, legacy, fastbuild, 0, 1, 2]
# 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.Mad,
features.CoreAudio,
features.MediaFoundation,
features.HSS1394,
features.HID,
features.Bulk,
features.MacAppStoreException,
features.VinylControl,
features.LiveBroadcasting,
features.Opus,
features.Profiling,
features.BuildTime,
features.Verbose,
features.Optimize,
features.FAAD,
features.FFmpeg,
features.WavPack,
features.ModPlug,
features.TestSuite,
features.ColorDiagnostics,
features.Sanitizers,
features.LocaleCompare,
features.Lilv,
features.Battery,
features.QtKeychain,
# "Features" of dubious quality
features.PerfTools,
features.AsmLib,
]
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)
# If the variant_dir does not exist then we will not chdir into it when calling
# SConscript.env, making the imperative logic (e.g. writing build.h) in
# SConscript.env behave differently on the first invocation vs. subsequent
# invocations.
try:
os.mkdir(build.build_dir)
except:
pass
SConscript('SConscript.env', variant_dir=build.build_dir, duplicate=0)
# Grab the list of sources generated by SConscript.env
Import('sources')
# Produce compile_commands.json, which is used by clang-tidy and related tools.
build.env.Tool("compile_commands")
build.env.Alias("compiledb", build.env.CompilationDatabase('compile_commands.json'))
# Build compile_commands.json by default.
build.env.Default("compile_commands.json")
# Setup and build the "mixxx" executable target. Also sets up our install
# targets for each platform.
SConscript('SConscript', variant_dir=build.build_dir, duplicate=0,
exports=['build', 'sources'])
#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"))