blob: e14850b725dd9e3ad53eb1e10e1c6a27f45afb77 [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001# This file has targets for various external libraries.
2# download_externals.sh makes sure that all of them have been downloaded.
3{
4 'variables': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -08005 'externals': '<(AOS)/../output/downloaded',
6 'externals_abs': '<!(readlink -f ../../output/downloaded)',
Brian Silverman99895b92014-09-14 01:01:15 -04007 'compiled': '<(externals)/../compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)',
8 'compiled_abs': '<(externals_abs)/../compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)',
brians343bc112013-02-10 01:53:46 +00009
10# These versions have to be kept in sync with the ones in download_externals.sh.
Brian Silverman87bfd112014-04-08 19:48:51 -070011 'eigen_version': '3.2.1',
Brian Silverman29458232014-04-30 15:53:46 -070012 'gtest_version': '1.6.0-p2',
Brian Silverman8efe23e2013-07-07 23:31:37 -070013 'ctemplate_version': '129',
Brian Silverman798c7782013-03-28 16:48:02 -070014 'gflags_version': '2.0',
Brian Silverman6137a502013-04-22 15:41:36 -070015 'compiler_rt_version': 'RELEASE_32_final',
Brian Silverman8efe23e2013-07-07 23:31:37 -070016 'libevent_version': '2.0.21',
Austin Schuh69155282013-10-27 14:52:35 -070017 'libcdd_version': '094g',
Brian Silverman3aa0d542014-01-25 17:16:43 -080018 'stm32flash_commit': '8399fbe1baf2b7d097746786458021d92895d71b',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080019
20 'allwpilib': '<(AOS)/externals/allwpilib',
Brian Silverman2aa83d72015-01-24 18:03:11 -050021 'forwpilib': '<(AOS)/externals/forwpilib',
brians343bc112013-02-10 01:53:46 +000022 },
23 'targets': [
24 {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080025 'target_name': 'WPILib',
Austin Schuh010eb812014-10-25 18:06:49 -070026 'type': 'static_library',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080027 'variables': {
28 'header_dirs': [
Brian Silverman2aa83d72015-01-24 18:03:11 -050029 '<(forwpilib)',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080030 '<(allwpilib)/wpilibc/wpilibC++/include',
31 '<(allwpilib)/wpilibc/wpilibC++Devices/include',
32 '<(allwpilib)/hal/include',
33 '<(allwpilib)/hal/lib/Athena/FRC_FPGA_ChipObject',
Brian Silverman2aa83d72015-01-24 18:03:11 -050034 '<(allwpilib)/hal/lib/Athena',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080035 ],
36 },
Austin Schuh010eb812014-10-25 18:06:49 -070037 'include_dirs': [
Brian Silverman7ffa0a52015-01-10 22:15:40 -080038 '<@(header_dirs)'
39 ],
40 'cflags': [
Brian Silvermanc1a55832015-02-17 21:25:36 -050041 '-Wno-error',
42 '-fno-strict-aliasing',
43 '-O0',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080044 ],
45 'sources': [
46 '<!@(ls <(allwpilib)/wpilibc/wpilibC++/src/*.cpp)',
47 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/*.cpp)',
48 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/Internal/*.cpp)',
49 '<!@(ls <(allwpilib)/hal/lib/Athena/*.cpp)',
50 '<!@(ls <(allwpilib)/hal/lib/Athena/ctre/*.cpp)',
Brian Silverman2aa83d72015-01-24 18:03:11 -050051 '<(forwpilib)/dma.cc',
Austin Schuh010eb812014-10-25 18:06:49 -070052 ],
53 'link_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080054 'library_dirs': [
55 '<(allwpilib)/ni-libraries',
56 ],
Austin Schuh010eb812014-10-25 18:06:49 -070057 'libraries': [
Austin Schuh010eb812014-10-25 18:06:49 -070058 '-lpthread',
59 '-lFRC_NetworkCommunication',
60 '-lRoboRIO_FRC_ChipObject',
61 '-lNiFpgaLv',
62 '-lNiFpga',
63 '-lNiRioSrv',
64 '-lspi',
65 '-li2c',
Austin Schuh010eb812014-10-25 18:06:49 -070066 ],
67 },
68 'direct_dependent_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080069 'include_dirs': [
70 '<@(header_dirs)'
Austin Schuh010eb812014-10-25 18:06:49 -070071 ],
72 },
73 },
74 {
Brian Silverman6ae77dd2013-03-29 22:28:08 -070075 'target_name': 'opencv',
76 'type': 'none',
77 'link_settings': {
78 'libraries': [
79 '-lopencv_core',
80 '-lopencv_imgproc',
81 ],
82 },
83 },
84 {
brians343bc112013-02-10 01:53:46 +000085 'target_name': 'libevent',
86 'type': 'none',
87 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080088 'libraries': ['<(compiled_abs)/libevent-<(libevent_version)-prefix/lib/libevent.a'],
Brian Silverman8efe23e2013-07-07 23:31:37 -070089 },
90 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080091 'include_dirs': ['<(compiled)/libevent-<(libevent_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +000092 },
93 },
94 {
95 'target_name': 'eigen',
96 'type': 'none',
97 'direct_dependent_settings': {
Brian Silvermanefb993f2013-08-30 19:52:57 -070098 'cflags': [
99 '-isystem', '<(externals)/eigen-<(eigen_version)'
100 ],
brians343bc112013-02-10 01:53:46 +0000101 },
102 },
103 {
104 'target_name': 'libjpeg',
105 'type': 'none',
106 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800107 'libraries': ['<(compiled_abs)/libjpeg/lib/libjpeg.a'],
Brian Silverman8f1018b2013-11-17 21:35:15 -0800108 'cflags': [
109 '-isystem', '<(compiled)',
110 ],
brians343bc112013-02-10 01:53:46 +0000111 },
112 },
113 {
brians2fdfc072013-02-26 05:35:15 +0000114# Dependents should only use the "gtest/gtest_prod.h" header.
115# This target is NOT the correct one for "aos/common/gtest_prod.h". That one is
116# aos/common/common.gyp:gtest_prod. This target just deals with setting up to
117# use the gtest header.
118 'target_name': 'gtest_prod',
119 'type': 'static_library',
120 'direct_dependent_settings': {
121 'include_dirs': [
122 '<(externals)/gtest-<(gtest_version)/include'
123 ],
124 },
125 },
126 {
brians343bc112013-02-10 01:53:46 +0000127 'target_name': 'gtest',
128 'type': 'static_library',
129 'sources': [
Brian Silverman29458232014-04-30 15:53:46 -0700130 '<(externals)/gtest-<(gtest_version)/src/gtest-all.cc',
131 '<(externals)/gtest-<(gtest_version)/fused-src/gtest/gtest_main.cc',
132 ],
133 'include_dirs': [
134 '<(externals)/gtest-<(gtest_version)',
brians343bc112013-02-10 01:53:46 +0000135 ],
brians2fdfc072013-02-26 05:35:15 +0000136 'dependencies': [
137 'gtest_prod',
138 ],
139 'export_dependent_settings': [
140 'gtest_prod',
141 ],
brians343bc112013-02-10 01:53:46 +0000142 'cflags!': ['-Werror'],
143 'direct_dependent_settings': {
144 'include_dirs': ['<(externals)/gtest-<(gtest_version)/include'],
145 'target_conditions': [
Brian Silvermanb79131d2013-09-19 21:09:17 -0700146 ['_type=="executable" and is_special_test==0', {
brians343bc112013-02-10 01:53:46 +0000147 'product_dir': '<(test_dir)',
148 },
Brian Silvermanb79131d2013-09-19 21:09:17 -0700149 ], ['_type=="executable" and is_special_test==1', {
150 'product_dir': '<(test_dir)-special',
151 },
brians343bc112013-02-10 01:53:46 +0000152 ],
153 ],
154 },
155 },
156 {
157 'target_name': 'ctemplate',
158 'type': 'none',
159 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800160 'libraries': ['<(compiled_abs)/ctemplate-<(ctemplate_version)-prefix/lib/libctemplate.a'],
brians343bc112013-02-10 01:53:46 +0000161 },
162 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800163 'include_dirs': ['<(compiled)/ctemplate-<(ctemplate_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +0000164 },
165 },
Brian Silverman798c7782013-03-28 16:48:02 -0700166 {
167 'target_name': 'gflags',
168 'type': 'none',
169 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800170 'libraries': ['<(compiled_abs)/gflags-<(gflags_version)-prefix/lib/libgflags.a'],
Brian Silverman798c7782013-03-28 16:48:02 -0700171 },
172 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800173 'include_dirs': ['<(compiled)/gflags-<(gflags_version)-prefix/include'],
Brian Silverman798c7782013-03-28 16:48:02 -0700174 },
175 },
176 {
Austin Schuh69155282013-10-27 14:52:35 -0700177 'target_name': 'libcdd',
178 'type': 'none',
179 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800180 'libraries': ['<(compiled_abs)/libcdd-<(libcdd_version)-prefix/lib/libcdd.a'],
Austin Schuh69155282013-10-27 14:52:35 -0700181 },
182 'direct_dependent_settings': {
Brian Silverman8f1018b2013-11-17 21:35:15 -0800183 'include_dirs': ['<(compiled_abs)/'],
Austin Schuh69155282013-10-27 14:52:35 -0700184 },
185 },
Brian Silverman6137a502013-04-22 15:41:36 -0700186 ],
brians343bc112013-02-10 01:53:46 +0000187}