blob: 4012020dbe5f2856e24938135208ecc4e6406145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# =================================================================================================
# ADOBE SYSTEMS INCORPORATED
# Copyright 2020 Adobe Systems Incorporated
# All Rights Reserved
#
# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
# of the Adobe license agreement accompanying it.
# =================================================================================================
# Toolchain
include(CMakeForceCompiler)
# this one is important
set(CMAKE_SYSTEM_NAME Linux)
#
if(CMAKE_CL_64)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH "/usr/")
set(CMAKE_SYSTEM_LIBRARY_PATH "${CMAKE_FIND_ROOT_PATH}/")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
else()
# where is the target environment
set(CMAKE_FIND_ROOT_PATH "/usr/")
set(CMAKE_SYSTEM_LIBRARY_PATH "${CMAKE_FIND_ROOT_PATH}/")
set(CMAKE_SYSTEM_PROCESSOR "i386")
endif()
# specify the cross compiler
CMAKE_FORCE_C_COMPILER("${CMAKE_SYSTEM_LIBRARY_PATH}/bin/gcc" GNU)
CMAKE_FORCE_CXX_COMPILER("${CMAKE_SYSTEM_LIBRARY_PATH}/bin/g++" GNU)
set(CMAKE_MAKE_PROGRAMM "${CMAKE_SYSTEM_LIBRARY_PATH}/bin/make")
# specify to use secure settings
set(XMP_ENABLE_SECURE_SETTINGS "ON")
# 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)
# extra preprocessor defines
# make Ubuntu cruise happy (read http://old.nabble.com/g%2B%2B-cross-distro-compilation-problem-td30705910.html)
#set(CIT_TOOLCHAIN_COMPILE_FLAGS "-D__USE_XOPEN2K8")
#
message("+++ Toolchain setup:")
message("+++ ${CMAKE_SYSTEM_LIBRARY_PATH}")
message("+++ ${CMAKE_ASM_COMPILER}")
message("+++ ${CMAKE_AR}")
message("+++ ${CMAKE_LINKER}")
message("+++ ${CMAKE_BUILD_TOOL}")
|