[Libreoffice-commits] core.git: bin/gbuild-to-ide bin/gbuild-to-ideNS
Mike Kaganski
mike.kaganski at collabora.com
Fri Oct 27 06:33:49 UTC 2017
bin/gbuild-to-ide | 13 ++++++++++++-
bin/gbuild-to-ideNS | 13 ++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
New commits:
commit 9be47276cdd6a59647f6aa42d2cd35f05c51a16b
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Fri Oct 27 09:29:36 2017 +0300
VisualStudioIntegrationGenerator: honor defines' values
Before this, -D_WIN32_WINNT=0x0601 used to land to VS project simply
as _WIN32_WINNT (without value).
Change-Id: I68ebdc24c3181c5d9e046280756e4cefee3de46c
Reviewed-on: https://gerrit.libreoffice.org/43928
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index d50801c3e6ca..4f6a94058fab 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -925,6 +925,17 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
f.write('\tEndGlobalSection\n')
f.write('EndGlobal\n')
+ @staticmethod
+ def defs_list(defs):
+ defines_list = []
+ # List defines
+ for key, value in defs.items():
+ define = key
+ if value is not None:
+ define += '=' + value
+ defines_list.append(define)
+ return defines_list
+
def write_project(self, project_path, target):
# See info at http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx
folder = os.path.dirname(project_path)
@@ -993,7 +1004,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
nmake_output_node = ET.SubElement(conf_node, '{%s}NMakeOutput' % ns)
nmake_output_node.text = os.path.join('../..', 'program', 'soffice.exe')
nmake_defs_node = ET.SubElement(conf_node, '{%s}NMakePreprocessorDefinitions' % ns)
- nmake_defs_node.text = ';'.join(list(target['DEFS']) + ['$(NMakePreprocessorDefinitions)'])
+ nmake_defs_node.text = ';'.join(self.defs_list(target['DEFS']) + ['$(NMakePreprocessorDefinitions)'])
include_path_node = ET.SubElement(conf_node, '{%s}IncludePath' % ns)
includes = [os.path.join('../..', elem) if elem[1] != ':' else elem for elem in target['include']]
include_path_node.text = ';'.join(includes + ['$(IncludePath)'])
diff --git a/bin/gbuild-to-ideNS b/bin/gbuild-to-ideNS
index 5fca58cf227d..abf7c7c572bb 100755
--- a/bin/gbuild-to-ideNS
+++ b/bin/gbuild-to-ideNS
@@ -831,6 +831,17 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
f.write('EndGlobal\n')
print('')
+ @staticmethod
+ def defs_list(defs):
+ defines_list = []
+ # List defines
+ for key, value in defs.items():
+ define = key
+ if value is not None:
+ define += '=' + value
+ defines_list.append(define)
+ return defines_list
+
def write_project(self, project_path, target):
# See info at http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx
folder = os.path.dirname(project_path)
@@ -899,7 +910,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
nmake_output_node = ET.SubElement(conf_node, '{%s}NMakeOutput' % ns)
nmake_output_node.text = os.path.join(self.gbuildparser.instdir, 'program', 'soffice.exe')
nmake_defs_node = ET.SubElement(conf_node, '{%s}NMakePreprocessorDefinitions' % ns)
- nmake_defs_node.text = ';'.join(list(target.defs) + ['$(NMakePreprocessorDefinitions)'])
+ nmake_defs_node.text = ';'.join(self.defs_list(target.defs) + ['$(NMakePreprocessorDefinitions)'])
include_path_node = ET.SubElement(conf_node, '{%s}IncludePath' % ns)
include_path_node.text = ';'.join(target.include + ['$(IncludePath)'])
More information about the Libreoffice-commits
mailing list