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
This commit is contained in:
Vincent Torri 2019-01-02 10:34:23 +01:00 committed by Marcel Hollerbach
parent 16b47b4969
commit e142bf796d
3 changed files with 40 additions and 15 deletions

View File

@ -12,18 +12,8 @@ AC_DEFUN([EFL_SELECT_WINDOWS_VERSION],
dnl configure option
AC_ARG_WITH([windows-version],
[AC_HELP_STRING([--with-windows-version], [select the target Windows version (vista or win7) @<:@default=win7@:>@])],
[
if test "x${with_windows_version}" = "xvista" ; then
_winver="vista"
else
if test "x${with_windows_version}" = "xwin7" ; then
_winver="win7"
else
_winver="error"
fi
fi
],
[AC_HELP_STRING([--with-windows-version], [select the target Windows version (vista, win7, win8, win81 or win10) @<:@default=win7@:>@])],
[_winver=${with_windows_version}],
[_winver="win7"])
AC_MSG_CHECKING([which Windows version to target])
@ -38,6 +28,18 @@ case "${_winver}" in
EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0601 -DWINVER=0x0601"
_efl_windows_version="Windows 7"
;;
win8)
EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0602 -DWINVER=0x0602"
_efl_windows_version="Windows 8"
;;
win81)
EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0603 -DWINVER=0x0603"
_efl_windows_version="Windows 8.1"
;;
win10)
EFL_WINDOWS_VERSION_CFLAGS="-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00"
_efl_windows_version="Windows 10"
;;
*)
AC_MSG_ERROR([Wrong Windows version passed to configure. Run ./configure --help])
;;
@ -46,5 +48,6 @@ esac
EFL_CFLAGS="${EFL_CFLAGS} ${EFL_WINDOWS_VERSION_CFLAGS}"
AC_SUBST([EFL_WINDOWS_VERSION_CFLAGS])
AC_SUBST([_efl_windows_version])
AC_MSG_NOTICE([Targetting ${_efl_windows_version}])
])

View File

@ -102,10 +102,25 @@ foreach lang : ['c', 'objc', 'cpp']
add_global_arguments('-DEFL_BUILD=1', language: lang)
add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
if sys_windows == true
add_global_arguments('-DWINVER=0x0601', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0601', language: lang)
if (get_option('windows-version') == 'vista')
add_global_arguments('-DWINVER=0x060', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang)
elif (get_option('windows-version') == 'win7')
add_global_arguments('-DWINVER=0x0601', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0601', language: lang)
elif (get_option('windows-version') == 'win8')
add_global_arguments('-DWINVER=0x0602', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0602', language: lang)
elif (get_option('windows-version') == 'win81')
add_global_arguments('-DWINVER=0x0603', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0603', language: lang)
elif (get_option('windows-version') == 'win10')
add_global_arguments('-DWINVER=0x0A00', language: lang)
add_global_arguments('-D_WIN32_WINNT=0x0A00', language: lang)
else
error('Version of targetted Windows incorrect')
endif
endif
endforeach
config_h = configuration_data()

View File

@ -339,3 +339,10 @@ option('elogind',
value : false,
description : 'use elogind support'
)
option('windows-version',
type : 'combo',
choices : ['vista', 'win7', 'win8', 'win81', 'win10'],
value : 'win7',
description : 'When host_machine is windows, compile the efl with the specified version of Windows'
)