-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
106 lines (96 loc) · 3.5 KB
/
CMakeLists.txt
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
cmake_minimum_required(VERSION 3.6)
project(aapt_cmake_buildscript)
#纯头文件引用
set(native_header
${CMAKE_SOURCE_DIR}/frameworks/native/include
)
set(safe_iop_header
${CMAKE_SOURCE_DIR}/external/safe-iop/include
)
set(libbacktrace_header
${CMAKE_SOURCE_DIR}/system/core/libbacktrace
${CMAKE_SOURCE_DIR}/system/core/libbacktrace/include
)
set(libsystem_header
${CMAKE_SOURCE_DIR}/system/core/libsystem/include
)
#源码和头文件引用
set(androidfw_header
${CMAKE_SOURCE_DIR}/frameworks/base/libs/androidfw/include
)
set(expat_header
${CMAKE_SOURCE_DIR}/external/expat
${CMAKE_SOURCE_DIR}/external/expat/lib
)
set(libpng_header
${CMAKE_SOURCE_DIR}/external/libpng
)
set(protobuf_header
${CMAKE_SOURCE_DIR}/external/protobuf/android
${CMAKE_SOURCE_DIR}/external/protobuf/src
)
set(zlib_header
${CMAKE_SOURCE_DIR}/external/zlib
${CMAKE_SOURCE_DIR}/external/zlib/src
)
set(libcxx_header
${CMAKE_SOURCE_DIR}/external/libcxx/include
)
set(libcxxabi_header
${CMAKE_SOURCE_DIR}/external/libcxxabi/include
)
set(compiler_rt_header
${CMAKE_SOURCE_DIR}/external/compiler-rt/include
)
set(base_header
${CMAKE_SOURCE_DIR}/system/core/base/include
)
set(libcutils_header
${CMAKE_SOURCE_DIR}/system/core/libcutils
${CMAKE_SOURCE_DIR}/system/core/libcutils/include
)
set(liblog_header
${CMAKE_SOURCE_DIR}/system/core/liblog
${CMAKE_SOURCE_DIR}/system/core/liblog/include
)
set(libutils_header
${CMAKE_SOURCE_DIR}/system/core/libutils
${CMAKE_SOURCE_DIR}/system/core/libutils/include
)
set(libziparchive_header
${CMAKE_SOURCE_DIR}/system/core/libziparchive
${CMAKE_SOURCE_DIR}/system/core/libziparchive/include
)
set(libnativehelper_header
${CMAKE_SOURCE_DIR}/libnativehelper/include_jni
)
#aapt头文件
set(aapt_header
${CMAKE_SOURCE_DIR}/frameworks/base/tools/aapt
)
#aapt2头文件
set(aapt2_header
${CMAKE_SOURCE_DIR}/frameworks/base/tools/aapt2
)
set(global_libcxx_cxxflags "-nostdinc++ -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY")
MESSAGE(STATUS "当前CMAKE_SOURCE_DIR目录: ${CMAKE_SOURCE_DIR}")
#添加子目录构建脚本
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libcxx)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libcxxabi)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/compiler-rt)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/zlib)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libpng)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/androidfw)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/base)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/liblog)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libziparchive)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/expat)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libcutils)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/libutils)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/protobuf/libprotobuf-cpp-lite)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/protobuf/aprotoc)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/aapt_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/aapt)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/aapt2_static)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/aapt2)
add_subdirectory(${CMAKE_SOURCE_DIR}/buildscript/aapt2_jni)