diff options
author | Nino Miškić-Pletenac <nino.mip@gmail.com> | 2018-12-20 20:18:40 +0100 |
---|---|---|
committer | Nino Miškić-Pletenac <nino.mip@gmail.com> | 2018-12-24 17:15:30 +0100 |
commit | 585482e5fd67a137a99d53458dc9147125282816 (patch) | |
tree | dae4accff30425da41c2e50d5461f7abd48e01a1 /build | |
parent | 061073f2ff46c1d6b728954f96deb431a9537d19 (diff) |
Remove duplicate -lvamp-hostsdk and -ldl from LIBS
Diffstat (limited to 'build')
-rw-r--r-- | build/features.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/build/features.py b/build/features.py index 7a3f11ca39..83ed867f67 100644 --- a/build/features.py +++ b/build/features.py @@ -355,14 +355,18 @@ class Vamp(Feature): # If there is no system vamp-hostsdk is installed or if the version # of the installed vamp-hostsdk is less than the bundled version, # then we'll directly link the bundled vamp-hostsdk - if not conf.CheckLib('vamp-hostsdk') or not conf.CheckForPKG('vamp-plugin-sdk', '2.7.1'): + # Note: We're adding -lvamp-hostsdk to LIBS in sources(), so + # don't add it now in order to prevent duplication. + if not conf.CheckLib('vamp-hostsdk', autoadd=False) or not conf.CheckForPKG('vamp-plugin-sdk', '2.7.1'): self.INTERNAL_LINK = True build.env.Append(CPPPATH=['#' + self.INTERNAL_VAMP_PATH]) # Needed on Linux at least. Maybe needed elsewhere? if build.platform_is_linux: # Optionally link libdl Required for some distros. - conf.CheckLib(['dl', 'libdl']) + # Note: We are adding -ldl to LIBS in sources(), so + # don't add it now in order to prevent duplication. + conf.CheckLib(['dl', 'libdl'], autoadd=False) # FFTW3 support have_fftw3_h = conf.CheckHeader('fftw3.h') @@ -383,10 +387,12 @@ class Vamp(Feature): env.SConscript(env.File('SConscript', vamp_dir)) build.env.Append(LIBPATH=self.INTERNAL_VAMP_PATH) - build.env.Append(LIBS=['vamp-hostsdk']) - if build.platform_is_linux: - build.env.Append(LIBS=['dl']) + build.env.Append(LIBS=['vamp-hostsdk']) + + # Ubuntu requires -ldl to be specified after -lvamp-hostsdk. + if build.platform_is_linux: + build.env.Append(LIBS=['dl']) return ['src/analyzer/vamp/vampanalyzer.cpp', 'src/analyzer/vamp/vamppluginadapter.cpp', |