externalproject: Fix error when used from main project

This commit is contained in:
Xavier Claessens 2021-03-11 08:08:50 -05:00 committed by Xavier Claessens
parent cb96e79c15
commit f6d5e8aa47
1 changed files with 1 additions and 1 deletions

View File

@ -59,13 +59,13 @@ class ExternalProject(InterpreterObject):
self.verbose = verbose
self.user_env = env
self.name = self.subdir.name
self.src_dir = Path(self.env.get_source_dir(), self.subdir)
self.build_dir = Path(self.env.get_build_dir(), self.subdir, 'build')
self.install_dir = Path(self.env.get_build_dir(), self.subdir, 'dist')
self.prefix = Path(self.env.coredata.get_option(OptionKey('prefix')))
self.libdir = Path(self.env.coredata.get_option(OptionKey('libdir')))
self.includedir = Path(self.env.coredata.get_option(OptionKey('includedir')))
self.name = self.src_dir.name
# On Windows if the prefix is "c:/foo" and DESTDIR is "c:/bar", `make`
# will install files into "c:/bar/c:/foo" which is an invalid path.