summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-01-02 10:34:23 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-02 10:34:47 +0100
commite142bf796d013956c2393c882c7f4f6e244751e3 (patch)
treef93f3e6a5c8c3f29f3e41c1bb3e05a1804bd222b
parent16b47b4969368437f6929d2264316eb2d1707c82 (diff)
Add support of Windows 8, 8.1 and 10
Reviewers: raster, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7528
-rw-r--r--m4/evil_windows.m427
-rw-r--r--meson.build21
-rw-r--r--meson_options.txt7
3 files changed, 40 insertions, 15 deletions
diff --git a/m4/evil_windows.m4 b/m4/evil_windows.m4
index fff9f8251b..b3fb94e06b 100644
--- a/m4/evil_windows.m4
+++ b/m4/evil_windows.m4
@@ -12,18 +12,8 @@ AC_DEFUN([EFL_SELECT_WINDOWS_VERSION],
12dnl configure option 12dnl configure option
13 13
14AC_ARG_WITH([windows-version], 14AC_ARG_WITH([windows-version],
15 [AC_HELP_STRING([--with-windows-version], [select the target Windows version (vista or win7) @<:@default=win7@:>@])], 15 [AC_HELP_STRING([--with-windows-version], [select the target Windows version (vista, win7, win8, win81 or win10) @<:@default=win7@:>@])],
16 [ 16 [_winver=${with_windows_version}],
17 if test "x${with_windows_version}" = "xvista" ; then
18 _winver="vista"
19 else
20 if test "x${with_windows_version}" = "xwin7" ; then
21 _winver="win7"
22 else
23 _winver="error"
24 fi
25 fi
26 ],
27 [_winver="win7"]) 17 [_winver="win7"])
28 18
29AC_MSG_CHECKING([which Windows version to target]) 19AC_MSG_CHECKING([which Windows version to target])
@@ -38,6 +28,18 @@ case "${_winver}" in
38 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0601 -DWINVER=0x0601" 28 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0601 -DWINVER=0x0601"
39 _efl_windows_version="Windows 7" 29 _efl_windows_version="Windows 7"
40 ;; 30 ;;
31 win8)
32 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0602 -DWINVER=0x0602"
33 _efl_windows_version="Windows 8"
34 ;;
35 win81)
36 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0603 -DWINVER=0x0603"
37 _efl_windows_version="Windows 8.1"
38 ;;
39 win10)
40 EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00"
41 _efl_windows_version="Windows 10"
42 ;;
41 *) 43 *)
42 AC_MSG_ERROR([Wrong Windows version passed to configure. Run ./configure --help]) 44 AC_MSG_ERROR([Wrong Windows version passed to configure. Run ./configure --help])
43 ;; 45 ;;
@@ -46,5 +48,6 @@ esac
46EFL_CFLAGS="${EFL_CFLAGS} ${EFL_WINDOWS_VERSION_CFLAGS}" 48EFL_CFLAGS="${EFL_CFLAGS} ${EFL_WINDOWS_VERSION_CFLAGS}"
47AC_SUBST([EFL_WINDOWS_VERSION_CFLAGS]) 49AC_SUBST([EFL_WINDOWS_VERSION_CFLAGS])
48AC_SUBST([_efl_windows_version]) 50AC_SUBST([_efl_windows_version])
51AC_MSG_NOTICE([Targetting ${_efl_windows_version}])
49 52
50]) 53])
diff --git a/meson.build b/meson.build
index 448d60a479..a93ac5a245 100644
--- a/meson.build
+++ b/meson.build
@@ -102,10 +102,25 @@ foreach lang : ['c', 'objc', 'cpp']
102 add_global_arguments('-DEFL_BUILD=1', language: lang) 102 add_global_arguments('-DEFL_BUILD=1', language: lang)
103 add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang) 103 add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
104 if sys_windows == true 104 if sys_windows == true
105 add_global_arguments('-DWINVER=0x0601', language: lang) 105 if (get_option('windows-version') == 'vista')
106 add_global_arguments('-D_WIN32_WINNT=0x0601', language: lang) 106 add_global_arguments('-DWINVER=0x060', language: lang)
107 add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang)
108 elif (get_option('windows-version') == 'win7')
109 add_global_arguments('-DWINVER=0x0601', language: lang)
110 add_global_arguments('-D_WIN32_WINNT=0x0601', language: lang)
111 elif (get_option('windows-version') == 'win8')
112 add_global_arguments('-DWINVER=0x0602', language: lang)
113 add_global_arguments('-D_WIN32_WINNT=0x0602', language: lang)
114 elif (get_option('windows-version') == 'win81')
115 add_global_arguments('-DWINVER=0x0603', language: lang)
116 add_global_arguments('-D_WIN32_WINNT=0x0603', language: lang)
117 elif (get_option('windows-version') == 'win10')
118 add_global_arguments('-DWINVER=0x0A00', language: lang)
119 add_global_arguments('-D_WIN32_WINNT=0x0A00', language: lang)
120 else
121 error('Version of targetted Windows incorrect')
122 endif
107 endif 123 endif
108
109endforeach 124endforeach
110 125
111config_h = configuration_data() 126config_h = configuration_data()
diff --git a/meson_options.txt b/meson_options.txt
index a5db83d98e..e24f999ee4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -339,3 +339,10 @@ option('elogind',
339 value : false, 339 value : false,
340 description : 'use elogind support' 340 description : 'use elogind support'
341) 341)
342
343option('windows-version',
344 type : 'combo',
345 choices : ['vista', 'win7', 'win8', 'win81', 'win10'],
346 value : 'win7',
347 description : 'When host_machine is windows, compile the efl with the specified version of Windows'
348)