blob: e72f4f7adf22b280ff3ee89c6a23b4838c0c65b6 [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 Silverman68203532015-03-01 03:54:50 -050019 'seasocks_version': '1.1.2-p1',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080020
21 'allwpilib': '<(AOS)/externals/allwpilib',
Brian Silverman2aa83d72015-01-24 18:03:11 -050022 'forwpilib': '<(AOS)/externals/forwpilib',
brians343bc112013-02-10 01:53:46 +000023 },
24 'targets': [
25 {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080026 'target_name': 'WPILib',
Austin Schuh010eb812014-10-25 18:06:49 -070027 'type': 'static_library',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080028 'variables': {
29 'header_dirs': [
Brian Silverman2aa83d72015-01-24 18:03:11 -050030 '<(forwpilib)',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080031 '<(allwpilib)/wpilibc/wpilibC++/include',
32 '<(allwpilib)/wpilibc/wpilibC++Devices/include',
33 '<(allwpilib)/hal/include',
34 '<(allwpilib)/hal/lib/Athena/FRC_FPGA_ChipObject',
Brian Silverman2aa83d72015-01-24 18:03:11 -050035 '<(allwpilib)/hal/lib/Athena',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080036 ],
37 },
Austin Schuh010eb812014-10-25 18:06:49 -070038 'include_dirs': [
Brian Silverman7ffa0a52015-01-10 22:15:40 -080039 '<@(header_dirs)'
40 ],
41 'cflags': [
Brian Silvermanc1a55832015-02-17 21:25:36 -050042 '-Wno-error',
43 '-fno-strict-aliasing',
44 '-O0',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080045 ],
46 'sources': [
47 '<!@(ls <(allwpilib)/wpilibc/wpilibC++/src/*.cpp)',
48 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/*.cpp)',
49 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/Internal/*.cpp)',
50 '<!@(ls <(allwpilib)/hal/lib/Athena/*.cpp)',
51 '<!@(ls <(allwpilib)/hal/lib/Athena/ctre/*.cpp)',
Brian Silverman2aa83d72015-01-24 18:03:11 -050052 '<(forwpilib)/dma.cc',
Austin Schuh010eb812014-10-25 18:06:49 -070053 ],
54 'link_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080055 'library_dirs': [
56 '<(allwpilib)/ni-libraries',
57 ],
Austin Schuh010eb812014-10-25 18:06:49 -070058 'libraries': [
Austin Schuh010eb812014-10-25 18:06:49 -070059 '-lpthread',
60 '-lFRC_NetworkCommunication',
61 '-lRoboRIO_FRC_ChipObject',
62 '-lNiFpgaLv',
63 '-lNiFpga',
64 '-lNiRioSrv',
65 '-lspi',
66 '-li2c',
Austin Schuh010eb812014-10-25 18:06:49 -070067 ],
68 },
69 'direct_dependent_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080070 'include_dirs': [
71 '<@(header_dirs)'
Austin Schuh010eb812014-10-25 18:06:49 -070072 ],
73 },
74 },
75 {
Brian Silverman6ae77dd2013-03-29 22:28:08 -070076 'target_name': 'opencv',
77 'type': 'none',
78 'link_settings': {
79 'libraries': [
80 '-lopencv_core',
81 '-lopencv_imgproc',
82 ],
83 },
84 },
85 {
brians343bc112013-02-10 01:53:46 +000086 'target_name': 'libevent',
87 'type': 'none',
88 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080089 'libraries': ['<(compiled_abs)/libevent-<(libevent_version)-prefix/lib/libevent.a'],
Brian Silverman8efe23e2013-07-07 23:31:37 -070090 },
91 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080092 'include_dirs': ['<(compiled)/libevent-<(libevent_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +000093 },
94 },
95 {
96 'target_name': 'eigen',
97 'type': 'none',
98 'direct_dependent_settings': {
Brian Silvermanefb993f2013-08-30 19:52:57 -070099 'cflags': [
100 '-isystem', '<(externals)/eigen-<(eigen_version)'
101 ],
brians343bc112013-02-10 01:53:46 +0000102 },
103 },
104 {
105 'target_name': 'libjpeg',
106 'type': 'none',
107 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800108 'libraries': ['<(compiled_abs)/libjpeg/lib/libjpeg.a'],
Brian Silverman8f1018b2013-11-17 21:35:15 -0800109 'cflags': [
110 '-isystem', '<(compiled)',
111 ],
brians343bc112013-02-10 01:53:46 +0000112 },
113 },
114 {
brians2fdfc072013-02-26 05:35:15 +0000115# Dependents should only use the "gtest/gtest_prod.h" header.
116# This target is NOT the correct one for "aos/common/gtest_prod.h". That one is
117# aos/common/common.gyp:gtest_prod. This target just deals with setting up to
118# use the gtest header.
119 'target_name': 'gtest_prod',
120 'type': 'static_library',
121 'direct_dependent_settings': {
122 'include_dirs': [
123 '<(externals)/gtest-<(gtest_version)/include'
124 ],
125 },
126 },
127 {
brians343bc112013-02-10 01:53:46 +0000128 'target_name': 'gtest',
129 'type': 'static_library',
130 'sources': [
Brian Silverman29458232014-04-30 15:53:46 -0700131 '<(externals)/gtest-<(gtest_version)/src/gtest-all.cc',
132 '<(externals)/gtest-<(gtest_version)/fused-src/gtest/gtest_main.cc',
133 ],
134 'include_dirs': [
135 '<(externals)/gtest-<(gtest_version)',
brians343bc112013-02-10 01:53:46 +0000136 ],
brians2fdfc072013-02-26 05:35:15 +0000137 'dependencies': [
138 'gtest_prod',
139 ],
140 'export_dependent_settings': [
141 'gtest_prod',
142 ],
brians343bc112013-02-10 01:53:46 +0000143 'cflags!': ['-Werror'],
144 'direct_dependent_settings': {
145 'include_dirs': ['<(externals)/gtest-<(gtest_version)/include'],
146 'target_conditions': [
Brian Silvermanb79131d2013-09-19 21:09:17 -0700147 ['_type=="executable" and is_special_test==0', {
brians343bc112013-02-10 01:53:46 +0000148 'product_dir': '<(test_dir)',
149 },
Brian Silvermanb79131d2013-09-19 21:09:17 -0700150 ], ['_type=="executable" and is_special_test==1', {
151 'product_dir': '<(test_dir)-special',
152 },
brians343bc112013-02-10 01:53:46 +0000153 ],
154 ],
155 },
156 },
157 {
158 'target_name': 'ctemplate',
159 'type': 'none',
160 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800161 'libraries': ['<(compiled_abs)/ctemplate-<(ctemplate_version)-prefix/lib/libctemplate.a'],
brians343bc112013-02-10 01:53:46 +0000162 },
163 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800164 'include_dirs': ['<(compiled)/ctemplate-<(ctemplate_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +0000165 },
166 },
Brian Silverman798c7782013-03-28 16:48:02 -0700167 {
168 'target_name': 'gflags',
169 'type': 'none',
170 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800171 'libraries': ['<(compiled_abs)/gflags-<(gflags_version)-prefix/lib/libgflags.a'],
Brian Silverman798c7782013-03-28 16:48:02 -0700172 },
173 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800174 'include_dirs': ['<(compiled)/gflags-<(gflags_version)-prefix/include'],
Brian Silverman798c7782013-03-28 16:48:02 -0700175 },
176 },
177 {
Austin Schuh69155282013-10-27 14:52:35 -0700178 'target_name': 'libcdd',
179 'type': 'none',
180 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800181 'libraries': ['<(compiled_abs)/libcdd-<(libcdd_version)-prefix/lib/libcdd.a'],
Austin Schuh69155282013-10-27 14:52:35 -0700182 },
183 'direct_dependent_settings': {
Brian Silverman8f1018b2013-11-17 21:35:15 -0800184 'include_dirs': ['<(compiled_abs)/'],
Austin Schuh69155282013-10-27 14:52:35 -0700185 },
186 },
Comran Morshedfe7f9ea2015-02-19 23:52:57 +0000187 {
188 'target_name': 'seasocks',
189 'type': 'static_library',
190 'sources': [
191 '<!@(find <(externals)/seasocks-<(seasocks_version)/src/main/c -name *.cpp)',
192 ],
193 'include_dirs': [
194 '<(AOS)/externals/seasocks',
195 '<(externals_abs)/seasocks-<(seasocks_version)/src/main/c',
196 ],
197 'cflags': [
198 '-Wno-unused-parameter',
199 '-Wno-format-nonliteral',
200 '-Wno-error=cast-align',
201 '-Wno-switch-enum',
202 '-Wno-cast-qual',
203 '-Wno-error=strict-aliasing',
204 ],
205 'direct_dependent_settings': {
206 'include_dirs': [
207 '<(AOS)/externals/seasocks',
208 '<(externals)/seasocks-<(seasocks_version)/src/main/c',
209 ],
210 },
211 },
Brian Silverman6137a502013-04-22 15:41:36 -0700212 ],
brians343bc112013-02-10 01:53:46 +0000213}