[Subtitles] Partial fix for text/border color gap
[xbmc.git] / tools / depends / native / Toolchain-Native.cmake.in
blobc5f5643ab61b920423dd5a20ae3d9bd77b04b1fa
1 set(NATIVEPREFIX "@prefix@/@tool_dir@")
3 set(TARBALL_DIR "@use_tarballs@")
5 set(OS "@build_os@")
6 set(CMAKE_SYSTEM_PROCESSOR @host_cpu@)
7 set(CPU "@use_buildcpu@")
9 if(OS STREQUAL linux)
10   set(CMAKE_SYSTEM_NAME Linux)
11 elseif(OS STREQUAL osx)
12   set(CMAKE_SYSTEM_NAME Darwin)
13 endif()
15 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
16   if(CPU STREQUAL "arm")
17     set(CPU arm64)
18   endif()
19   if(CPU STREQUAL arm64)
20     set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
21   else()
22     set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
23   endif()
25   set(CMAKE_OSX_SYSROOT "@host_sysroot@")
26 endif()
27 set(CMAKE_SYSTEM_VERSION 1)
29 # specify the cross compiler
30 set(CMAKE_C_COMPILER @CC_FOR_BUILD@)
31 set(CMAKE_CXX_COMPILER @CXX_FOR_BUILD@)
32 set(CMAKE_AR @AR_FOR_BUILD@ CACHE FILEPATH "Archiver")
33 SET(CMAKE_AS @AS_FOR_BUILD@ CACHE FILEPATH "Assembler")
34 set(CMAKE_LINKER @LD_FOR_BUILD@ CACHE FILEPATH "Linker")
35 set(CMAKE_NM @NM_FOR_BUILD@ CACHE FILEPATH "Nm")
36 set(CMAKE_STRIP @STRIP_FOR_BUILD@ CACHE PATH "strip binary" FORCE)
37 set(CMAKE_OBJDUMP @OBJDUMP_FOR_BUILD@ CACHE FILEPATH "Objdump")
38 set(CMAKE_RANLIB @RANLIB_FOR_BUILD@ CACHE FILEPATH "Ranlib")
40 if(NOT "@use_ccache@" STREQUAL "")
41   set(CMAKE_CXX_COMPILER_LAUNCHER @CCACHE@)
42   set(CMAKE_C_COMPILER_LAUNCHER @CCACHE@)
43 endif()
45 set(CMAKE_C_FLAGS "@host_includes@ -I@prefix@/@tool_dir@/include")
46 set(CMAKE_CXX_FLAGS "@host_cxxflags@ @host_includes@ -I@prefix@/@tool_dir@/include")
47 set(CMAKE_EXE_LINKER_FLAGS "@host_includes@ -L@prefix@/@tool_dir@/lib")
49 # where is the target environment
50 set(CMAKE_FIND_ROOT_PATH @prefix@/@tool_dir@)
51 set(CMAKE_LIBRARY_PATH @prefix@/@tool_dir@/lib)
52 if(NOT "@use_toolchain@" STREQUAL "")
53   list(APPEND CMAKE_FIND_ROOT_PATH @use_toolchain@ @use_toolchain@/@use_host@ @use_toolchain@/@use_host@/sysroot @use_toolchain@/@use_host@/sysroot/usr @use_toolchain@/@use_host@/libc @use_toolchain@/lib/@use_host@/sysroot @use_toolchain@/usr @use_toolchain@/sysroot/usr)
54   set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH}:@use_toolchain@/usr/lib/@use_host@:@use_toolchain@/lib/@use_host@")
55 endif()
56 if(NOT "@host_sysroot@" STREQUAL "")
57   list(APPEND CMAKE_FIND_ROOT_PATH @host_sysroot@ @host_sysroot@/usr)
58 endif()
60 # search for programs in the build host directories
61 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
62 # for libraries and headers in the target directories
63 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
64 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
65 set(CMAKE_FIND_FRAMEWORK LAST)
67 # common autoconf build tools
68 find_program(AUTOCONF autoconf HINTS "${NATIVEPREFIX}/bin" REQUIRED)
69 find_program(ACLOCAL aclocal HINTS "${NATIVEPREFIX}/bin" REQUIRED)
70 find_program(AUTOHEADER autoheader HINTS "${NATIVEPREFIX}/bin" REQUIRED)
71 find_program(AUTOMAKE automake HINTS "${NATIVEPREFIX}/bin" REQUIRED)
72 find_program(AUTOM4TE autom4te HINTS "${NATIVEPREFIX}/bin" REQUIRED)
73 find_program(AUTOPOINT autopoint HINTS "${NATIVEPREFIX}/bin" REQUIRED)
74 find_program(AUTORECONF autoreconf HINTS "${NATIVEPREFIX}/bin" REQUIRED)
75 find_program(LIBTOOL libtool HINTS "${NATIVEPREFIX}/bin" REQUIRED)
76 find_program(LIBTOOLIZE libtoolize HINTS "${NATIVEPREFIX}/bin" REQUIRED)
78 set(ENV{ACLOCAL_PATH} "${NATIVEPREFIX}/share/aclocal")
79 set(ENV{PATH} "${NATIVEPREFIX}/bin:$ENV{PATH}")