Use the system declared in the cross-env in the cmake_cross_file template.
Cmake use the 'Windows' name to detect we are building to Windows but meson use the lowered 'windows' string. So we need to lower the system declared in the cross-env when generating the meson cross_file.
This commit is contained in:
parent
d8473e6a9a
commit
71c52d9ee4
|
@ -116,7 +116,8 @@ class TargetInfo:
|
|||
'extra_libs': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4', '-lmsvcr90'],
|
||||
'extra_cflags': ['-DWIN32'],
|
||||
'host_machine': {
|
||||
'system': 'windows',
|
||||
'system': 'Windows',
|
||||
'lsystem': 'windows',
|
||||
'cpu_family': 'x86',
|
||||
'cpu': 'i686',
|
||||
'endian': 'little'
|
||||
|
@ -148,6 +149,7 @@ class AndroidTargetInfo(TargetInfo):
|
|||
'extra_cflags': [],
|
||||
'host_machine': {
|
||||
'system': 'Android',
|
||||
'lsystem': 'android',
|
||||
'cpu_family': self.arch,
|
||||
'cpu': self.cpu,
|
||||
'endian': 'little'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR x86)
|
||||
SET(CMAKE_SYSTEM_NAME {host_machine[system]})
|
||||
SET(CMAKE_SYSTEM_PROCESSOR {host_machine[cpu_family]})
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER "{toolchain.binaries[CC]}")
|
||||
|
|
|
@ -14,5 +14,5 @@ cpp_args = {extra_cflags!r}
|
|||
[host_machine]
|
||||
cpu_family = '{host_machine[cpu_family]}'
|
||||
cpu = '{host_machine[cpu]}'
|
||||
system = '{host_machine[system]}'
|
||||
system = '{host_machine[lsystem]}'
|
||||
endian = '{host_machine[endian]}'
|
||||
|
|
Loading…
Reference in New Issue