summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-06-30 18:45:58 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-06-30 21:09:48 +0200
commit0e3394f7123b6d63b91c1c55f227253f21cba343 (patch)
treeace4b8dedcbc1bf11daf69e930aa8ae4a9b9dd18
parent76a52cb698801d9689a9bd92995a2a792a11639a (diff)
vs-ide-integration: set correct solution / project platform
This allows the IDE to show active #ifdef conditions, type sizes, alignment, memory layout, selected overloads, and so on. Change-Id: Idd1211df3b3745658f1996a494929b07cf7aa573 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169772 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rwxr-xr-xbin/gbuild-to-ide10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index ef1e27dd6748..b3f8b9fbd371 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -866,6 +866,12 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
def __init__(self, gbuildparser, ide):
IdeIntegrationGenerator.__init__(self, gbuildparser, ide)
self.toolset = os.environ['VCTOOLSET']
+ if os.environ['CPUNAME'] == 'X86_64':
+ self.platform = 'x64'
+ elif os.environ['CPUNAME'] == 'AARCH64':
+ self.platform = 'ARM'
+ else: # 'INTEL'
+ self.platform = 'Win32'
self.solution_directory = self.gbuildparser.builddir
self.configurations = {
'Build': {
@@ -995,7 +1001,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
f.write('EndProject\n')
# end Folders to group tests/libraries/executables
f.write('Global\n')
- platform = 'Win32'
+ platform = self.platform
f.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n')
for cfg in self.configurations:
f.write('\t\t%(cfg)s|%(platform)s = %(cfg)s|%(platform)s\n' % {'cfg': cfg, 'platform': platform})
@@ -1071,7 +1077,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
ET.register_namespace('', self.ns)
proj_node = ET.Element('{%s}Project' % self.ns, DefaultTargets='Build', ToolsVersion='4.0')
proj_confs_node = ET.SubElement(proj_node, '{%s}ItemGroup' % self.ns, Label='ProjectConfigurations')
- platform = 'Win32'
+ platform = self.platform
for configuration in self.configurations:
proj_conf_node = ET.SubElement(proj_confs_node,
'{%s}ProjectConfiguration' % self.ns,