[gtksourceview/meson.msvc.cleanups: 2/4] gtksourceview/meson.build: Clean up MSVC version check



commit c0665cdf41814c40490fc5a7f1c5c3bcc9c50d19
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Nov 21 11:48:55 2019 +0800

    gtksourceview/meson.build: Clean up MSVC version check
    
    Clean up the check on whether to include the $(srcrootdir)/msvc to look
    for the math.h header for earlier MSVC versions that do not come with
    round().

 gtksourceview/meson.build | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
index 82a28d2b..1c219517 100644
--- a/gtksourceview/meson.build
+++ b/gtksourceview/meson.build
@@ -128,18 +128,15 @@ if config_h.has('OS_OSX')
   ]
 endif
 
-if cc.get_id() == 'msvc'
+if cc.get_id() == 'msvc' and cc.version().version_compare('<18')
   # include our math.h to implement round() for pre-2013 Visual Studio
-  msvc_maj_ver = cc.version().split('.')[0].to_int()
-  if msvc_maj_ver < 18
-    gtksourceview_include_dirs = [rootdir, include_directories('../msvc')]
-  else
-    gtksourceview_include_dirs = rootdir
-  endif
+  gtksourceview_extra_include_dirs = include_directories('../msvc')
 else
-  gtksourceview_include_dirs = rootdir
+  gtksourceview_extra_include_dirs = []
 endif
 
+gtksourceview_include_dirs = [rootdir, gtksourceview_extra_include_dirs]
+
 core_enums_header = '''
 
 #if defined (GTK_SOURCE_COMPILATION) && defined (HAVE_CONFIG_H)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]