diff options
author | RJ Skerry-Ryan <rryan@mixxx.org> | 2018-10-13 13:35:47 -0700 |
---|---|---|
committer | RJ Skerry-Ryan <rryan@mixxx.org> | 2018-10-24 09:49:21 -0700 |
commit | 36e9ca77a6b852087d35232685ae2cef326412fc (patch) | |
tree | f3d7739e2d6c61088fed640290b14236755ab563 /lib | |
parent | 9ebb94ddf9cce9b37c908cbac4c3a0843f286a4c (diff) |
Build library objects in the SConscript variant_dir.
SCons has a feature that lets you declare a repository-root absolute
path to a file (e.g. "#lib/soundtouch/..."). Using this feature
prevents SCons from automatically re-directing built artifacts to a
variant_dir. To work around this, this commit moves src/SConscript and
src/SConscript.env to the root, and changes all paths in SConscripts
to use SConscript-relative paths.
This commit also switches to building an explicit static library for
vamp-hostdk, vamp-sdk, and soundtouch when internal linking is enabled
and the VAMP plugin now uses the system soundtouch if it is present.
Fixes Bug #1191327 and Bug #1617802.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/benchmark/SConscript | 4 | ||||
-rw-r--r-- | lib/gmock-1.7.0/SConscript | 5 | ||||
-rw-r--r-- | lib/gtest-1.7.0/SConscript | 4 | ||||
-rw-r--r-- | lib/soundtouch/SConscript | 27 | ||||
-rw-r--r-- | lib/vamp/SConscript | 23 |
5 files changed, 50 insertions, 13 deletions
diff --git a/lib/benchmark/SConscript b/lib/benchmark/SConscript index a105394a99..2dddc2e579 100644 --- a/lib/benchmark/SConscript +++ b/lib/benchmark/SConscript @@ -34,7 +34,3 @@ sources = [ benchmark_lib = env.StaticLibrary(target='benchmark', source=[sources]) - -# Install the libraries if needed. -if 'LIB_OUTPUT' in env.Dictionary(): - env.Install('$LIB_OUTPUT', source=[benchmark_lib]) diff --git a/lib/gmock-1.7.0/SConscript b/lib/gmock-1.7.0/SConscript index 6bbbf1cbb1..5a293b812a 100644 --- a/lib/gmock-1.7.0/SConscript +++ b/lib/gmock-1.7.0/SConscript @@ -25,8 +25,3 @@ gmock = env.StaticLibrary(target='gmock', # it is also used by the tests for Google Mock itself. gmock_main = env.StaticLibrary(target='gmock_main', source=gmock_main_sources) - -# Install the libraries if needed. -if 'LIB_OUTPUT' in env.Dictionary(): - env.Install('$LIB_OUTPUT', source=[gmock, gmock_main]) - diff --git a/lib/gtest-1.7.0/SConscript b/lib/gtest-1.7.0/SConscript index b8a3986217..303a8fbb9c 100644 --- a/lib/gtest-1.7.0/SConscript +++ b/lib/gtest-1.7.0/SConscript @@ -34,7 +34,3 @@ gtest_main_ex_obj = env_with_exceptions.Object(target='gtest_main_ex', gtest_ex_main = env_with_exceptions.StaticLibrary( target='gtest_ex_main', source=gtest_ex_obj + gtest_main_ex_obj) - -# Install the libraries if needed. -if 'LIB_OUTPUT' in env.Dictionary(): - env.Install('$LIB_OUTPUT', source=[gtest, gtest_main, gtest_ex_main]) diff --git a/lib/soundtouch/SConscript b/lib/soundtouch/SConscript new file mode 100644 index 0000000000..1df1e68b28 --- /dev/null +++ b/lib/soundtouch/SConscript @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +Import('env') +env = env.Clone() + +soundtouch_sources = [ + 'AAFilter.cpp', + 'BPMDetect.cpp', + 'FIFOSampleBuffer.cpp', + 'FIRFilter.cpp', + 'InterpolateCubic.cpp', + 'InterpolateLinear.cpp', + 'InterpolateShannon.cpp', + 'PeakFinder.cpp', + 'RateTransposer.cpp', + 'SoundTouch.cpp', + 'TDStretch.cpp', + # SoundTouch CPU optimizations are only for x86 + # architectures. SoundTouch automatically ignores these files + # when it is not being built for an architecture that supports + # them. + 'cpu_detect_x86.cpp', + 'mmx_optimized.cpp', + 'sse_optimized.cpp', +] + +env.StaticLibrary(target='soundtouch', source=soundtouch_sources) diff --git a/lib/vamp/SConscript b/lib/vamp/SConscript new file mode 100644 index 0000000000..ccc4734d1b --- /dev/null +++ b/lib/vamp/SConscript @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +Import('env') +env = env.Clone() + +env.Prepend(CPPPATH = ['.']) + +env.StaticLibrary('vamp-hostsdk', [ + 'src/vamp-hostsdk/Files.cpp', + 'src/vamp-hostsdk/PluginBufferingAdapter.cpp', + 'src/vamp-hostsdk/PluginChannelAdapter.cpp', + 'src/vamp-hostsdk/PluginHostAdapter.cpp', + 'src/vamp-hostsdk/PluginInputDomainAdapter.cpp', + 'src/vamp-hostsdk/PluginLoader.cpp', + 'src/vamp-hostsdk/PluginSummarisingAdapter.cpp', + 'src/vamp-hostsdk/PluginWrapper.cpp', + 'src/vamp-hostsdk/RealTime.cpp' +]) + +env.StaticLibrary('vamp-sdk', [ + 'src/vamp-sdk/PluginAdapter.cpp', + 'src/vamp-sdk/RealTime.cpp', +]) |