Pass correct option `-Dstatic_linkage` to libzim in native_mixed platform.

In native_mixed, we want to build a shared lib but we need to compile
with the static lib of the dependencies.
This commit is contained in:
Matthieu Gautier 2019-02-04 11:06:55 +01:00
parent 466dc8b64a
commit 4eb95fd4cc
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ from .base import (
Dependency,
GitClone,
MesonBuilder)
from kiwixbuild._global import option
class Libzim(Dependency):
name = "libzim"
@ -21,4 +22,6 @@ class Libzim(Dependency):
return "-DUSE_BUFFER_HEADER=false"
if platformInfo.build == 'iOS':
return "-Db_bitcode=true"
if platformInfo.name == 'native_mixed' and option('target') == 'libzim':
return "-Dstatic-linkage=true"
return ""