mirror of https://github.com/kiwix/libkiwix.git
Use "host_machine", not "target_machine" for cross-compilation
Read https://mesonbuild.com/Cross-compilation.html for all the rationals.
This commit is contained in:
parent
19dd068e5a
commit
f2088d7fe0
|
@ -19,11 +19,11 @@ if wrapper.contains('java')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# See https://github.com/kiwix/libkiwix/issues/371
|
# See https://github.com/kiwix/libkiwix/issues/371
|
||||||
if ['arm', 'mips', 'm68k', 'ppc', 'sh4'].contains(target_machine.cpu_family())
|
if ['arm', 'mips', 'm68k', 'ppc', 'sh4'].contains(host_machine.cpu_family())
|
||||||
extra_libs += '-latomic'
|
extra_libs += '-latomic'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (compiler.get_id() == 'gcc' and build_machine.system() == 'linux') or target_machine.system() == 'freebsd'
|
if (compiler.get_id() == 'gcc' and build_machine.system() == 'linux') or host_machine.system() == 'freebsd'
|
||||||
# C++ std::thread is implemented using pthread on linux by gcc
|
# C++ std::thread is implemented using pthread on linux by gcc
|
||||||
thread_dep = dependency('threads')
|
thread_dep = dependency('threads')
|
||||||
else
|
else
|
||||||
|
@ -51,12 +51,12 @@ endif
|
||||||
|
|
||||||
|
|
||||||
extra_cflags = ''
|
extra_cflags = ''
|
||||||
if target_machine.system() == 'windows' and static_deps
|
if host_machine.system() == 'windows' and static_deps
|
||||||
add_project_arguments('-DCURL_STATICLIB', language : 'cpp')
|
add_project_arguments('-DCURL_STATICLIB', language : 'cpp')
|
||||||
extra_cflags += '-DCURL_STATICLIB'
|
extra_cflags += '-DCURL_STATICLIB'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if target_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
add_project_arguments('-DNOMINMAX', language: 'cpp')
|
add_project_arguments('-DNOMINMAX', language: 'cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue