mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-26 10:11:27 +00:00
Create a real module kiwixbuild and make it installable. Split files.
Make kiwix-build installable using pip. Module is now called `kiwixbuild` because `kiwix-build` is not a valid python identifier. Also split toolchains in separated directory.
This commit is contained in:
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
if test -z "$PATH_ORIG" ; then
|
||||
PATH_ORIG="$PATH"; export PATH_ORIG;
|
||||
fi;
|
||||
|
||||
PATH="{root_path}/bin:$PATH_ORIG"; export PATH;
|
||||
|
||||
HOST_CC=gcc; export HOST_CC;
|
||||
unset PKG_CONFIG_PATH;
|
||||
|
||||
ccache=`which ccache`
|
||||
|
||||
CC={which:{binaries[c]}}
|
||||
CXX={which:{binaries[cpp]}}
|
||||
if [ "x$ccache" != "x" ] ; then
|
||||
CC="ccache $CC"
|
||||
CXX="ccache $CXX"
|
||||
fi
|
||||
export CC
|
||||
export CXX
|
||||
|
||||
AR={which:{binaries[ar]}}; export AR
|
||||
STRIP={which:{binaries[strip]}}; export STRIP
|
||||
CFLAGS=" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"; export CFLAGS;
|
||||
CXXFLAGS=" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"; export CXXFLAGS;
|
||||
|
||||
|
||||
exec "$@"
|
@ -1,7 +0,0 @@
|
||||
SET(CMAKE_SYSTEM_NAME {host_machine[system]})
|
||||
SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN {toolchain.builder.install_path})
|
||||
|
||||
SET(CMAKE_C_COMPILER "{toolchain.binaries[CC]}")
|
||||
SET(CMAKE_CXX_COMPILER "{toolchain.binaries[CXX]}")
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH {toolchain.root_path})
|
@ -1,25 +0,0 @@
|
||||
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]}")
|
||||
SET(CMAKE_CXX_COMPILER "{toolchain.binaries[CXX]}")
|
||||
SET(CMAKE_RC_COMPILER {toolchain.binaries[WINDRES]})
|
||||
SET(CMAKE_AR:FILEPATH {toolchain.binaries[AR]})
|
||||
SET(CMAKE_RANLIB:FILEPATH {toolchain.binaries[RANLIB]})
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH {toolchain.root_path})
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
@ -1,19 +0,0 @@
|
||||
[binaries]
|
||||
pkgconfig = 'pkg-config'
|
||||
c = '{toolchain.binaries[CC]}'
|
||||
ar = '{toolchain.binaries[AR]}'
|
||||
cpp = '{toolchain.binaries[CXX]}'
|
||||
strip = '{toolchain.binaries[STRIP]}'
|
||||
|
||||
[properties]
|
||||
c_link_args = {extra_libs!r}
|
||||
cpp_link_args = {extra_libs!r}
|
||||
c_args = {extra_cflags!r}
|
||||
cpp_args = {extra_cflags!r}
|
||||
android_abi = '{host_machine[abi]}'
|
||||
|
||||
[host_machine]
|
||||
cpu_family = '{host_machine[cpu_family]}'
|
||||
cpu = '{host_machine[cpu]}'
|
||||
system = '{host_machine[lsystem]}'
|
||||
endian = '{host_machine[endian]}'
|
@ -1,20 +0,0 @@
|
||||
[binaries]
|
||||
pkgconfig = 'pkg-config'
|
||||
c = '{toolchain.binaries[CC]}'
|
||||
ar = '{toolchain.binaries[AR]}'
|
||||
cpp = '{toolchain.binaries[CXX]}'
|
||||
strip = '{toolchain.binaries[STRIP]}'
|
||||
{toolchain.exec_wrapper_def}
|
||||
|
||||
[properties]
|
||||
c_link_args = {extra_libs!r}
|
||||
cpp_link_args = {extra_libs!r}
|
||||
c_args = {extra_cflags!r}
|
||||
cpp_args = {extra_cflags!r}
|
||||
android_abi = '{host_machine[abi]}'
|
||||
|
||||
[host_machine]
|
||||
cpu_family = '{host_machine[cpu_family]}'
|
||||
cpu = '{host_machine[cpu]}'
|
||||
system = '{host_machine[lsystem]}'
|
||||
endian = '{host_machine[endian]}'
|
Reference in New Issue
Block a user