mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 12:53:07 +02:00
Visual Studio builds: Fix .pc generation
The previous update did not account for when no exec_prefix is spcified, so update that, and use ${prefix} by default. Clean up a bit as well.
This commit is contained in:
parent
35b401c8bb
commit
bbf07fb15e
@ -50,9 +50,13 @@ class BasePCItems:
|
|||||||
if not os.path.exists(args.prefix):
|
if not os.path.exists(args.prefix):
|
||||||
raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix)
|
raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix)
|
||||||
|
|
||||||
|
# use absolute paths for prefix
|
||||||
|
self.prefix = os.path.abspath(args.prefix).replace('\\','/')
|
||||||
|
|
||||||
# check and setup the exec_prefix
|
# check and setup the exec_prefix
|
||||||
if getattr(args, 'exec_prefix', None) is None:
|
if getattr(args, 'exec_prefix', None) is None:
|
||||||
input_exec_prefix = args.prefix
|
exec_prefix_use_shorthand = True
|
||||||
|
self.exec_prefix = '${prefix}'
|
||||||
else:
|
else:
|
||||||
if args.exec_prefix.startswith('${prefix}'):
|
if args.exec_prefix.startswith('${prefix}'):
|
||||||
exec_prefix_use_shorthand = True
|
exec_prefix_use_shorthand = True
|
||||||
@ -112,13 +116,6 @@ class BasePCItems:
|
|||||||
else:
|
else:
|
||||||
self.libdir = os.path.abspath(input_libdir).replace('\\','/')
|
self.libdir = os.path.abspath(input_libdir).replace('\\','/')
|
||||||
|
|
||||||
# use absolute paths for prefix and exec_prefix
|
|
||||||
self.prefix = os.path.abspath(args.prefix).replace('\\','/')
|
|
||||||
if exec_prefix_use_shorthand is True:
|
|
||||||
self.exec_prefix = args.exec_prefix.replace('\\','/')
|
|
||||||
else:
|
|
||||||
self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/')
|
|
||||||
|
|
||||||
# setup dictionary for replacing items in *.pc.in
|
# setup dictionary for replacing items in *.pc.in
|
||||||
self.base_replace_items.update({'@VERSION@': self.version})
|
self.base_replace_items.update({'@VERSION@': self.version})
|
||||||
self.base_replace_items.update({'@prefix@': self.prefix})
|
self.base_replace_items.update({'@prefix@': self.prefix})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user