blob: 35d271de82f6bb55d0b2b94d6ceb8971baf74f2d [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': [
41 '-Wno-error=unused-parameter',
42 '-Wno-error=switch-enum',
43 ],
44 'sources': [
45 '<!@(ls <(allwpilib)/wpilibc/wpilibC++/src/*.cpp)',
46 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/*.cpp)',
47 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/Internal/*.cpp)',
48 '<!@(ls <(allwpilib)/hal/lib/Athena/*.cpp)',
49 '<!@(ls <(allwpilib)/hal/lib/Athena/ctre/*.cpp)',
Brian Silverman2aa83d72015-01-24 18:03:11 -050050 '<(forwpilib)/dma.cc',
Austin Schuh010eb812014-10-25 18:06:49 -070051 ],
52 'link_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080053 'library_dirs': [
54 '<(allwpilib)/ni-libraries',
55 ],
Austin Schuh010eb812014-10-25 18:06:49 -070056 'libraries': [
Austin Schuh010eb812014-10-25 18:06:49 -070057 '-lpthread',
58 '-lFRC_NetworkCommunication',
59 '-lRoboRIO_FRC_ChipObject',
60 '-lNiFpgaLv',
61 '-lNiFpga',
62 '-lNiRioSrv',
63 '-lspi',
64 '-li2c',
Austin Schuh010eb812014-10-25 18:06:49 -070065 ],
66 },
67 'direct_dependent_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080068 'include_dirs': [
69 '<@(header_dirs)'
Austin Schuh010eb812014-10-25 18:06:49 -070070 ],
71 },
72 },
73 {
Brian Silverman6ae77dd2013-03-29 22:28:08 -070074 'target_name': 'opencv',
75 'type': 'none',
76 'link_settings': {
77 'libraries': [
78 '-lopencv_core',
79 '-lopencv_imgproc',
80 ],
81 },
82 },
83 {
brians343bc112013-02-10 01:53:46 +000084 'target_name': 'libevent',
85 'type': 'none',
86 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080087 'libraries': ['<(compiled_abs)/libevent-<(libevent_version)-prefix/lib/libevent.a'],
Brian Silverman8efe23e2013-07-07 23:31:37 -070088 },
89 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080090 'include_dirs': ['<(compiled)/libevent-<(libevent_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +000091 },
92 },
93 {
94 'target_name': 'eigen',
95 'type': 'none',
96 'direct_dependent_settings': {
Brian Silvermanefb993f2013-08-30 19:52:57 -070097 'cflags': [
98 '-isystem', '<(externals)/eigen-<(eigen_version)'
99 ],
brians343bc112013-02-10 01:53:46 +0000100 },
101 },
102 {
103 'target_name': 'libjpeg',
104 'type': 'none',
105 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800106 'libraries': ['<(compiled_abs)/libjpeg/lib/libjpeg.a'],
Brian Silverman8f1018b2013-11-17 21:35:15 -0800107 'cflags': [
108 '-isystem', '<(compiled)',
109 ],
brians343bc112013-02-10 01:53:46 +0000110 },
111 },
112 {
brians2fdfc072013-02-26 05:35:15 +0000113# Dependents should only use the "gtest/gtest_prod.h" header.
114# This target is NOT the correct one for "aos/common/gtest_prod.h". That one is
115# aos/common/common.gyp:gtest_prod. This target just deals with setting up to
116# use the gtest header.
117 'target_name': 'gtest_prod',
118 'type': 'static_library',
119 'direct_dependent_settings': {
120 'include_dirs': [
121 '<(externals)/gtest-<(gtest_version)/include'
122 ],
123 },
124 },
125 {
brians343bc112013-02-10 01:53:46 +0000126 'target_name': 'gtest',
127 'type': 'static_library',
128 'sources': [
Brian Silverman29458232014-04-30 15:53:46 -0700129 '<(externals)/gtest-<(gtest_version)/src/gtest-all.cc',
130 '<(externals)/gtest-<(gtest_version)/fused-src/gtest/gtest_main.cc',
131 ],
132 'include_dirs': [
133 '<(externals)/gtest-<(gtest_version)',
brians343bc112013-02-10 01:53:46 +0000134 ],
brians2fdfc072013-02-26 05:35:15 +0000135 'dependencies': [
136 'gtest_prod',
137 ],
138 'export_dependent_settings': [
139 'gtest_prod',
140 ],
brians343bc112013-02-10 01:53:46 +0000141 'cflags!': ['-Werror'],
142 'direct_dependent_settings': {
143 'include_dirs': ['<(externals)/gtest-<(gtest_version)/include'],
144 'target_conditions': [
Brian Silvermanb79131d2013-09-19 21:09:17 -0700145 ['_type=="executable" and is_special_test==0', {
brians343bc112013-02-10 01:53:46 +0000146 'product_dir': '<(test_dir)',
147 },
Brian Silvermanb79131d2013-09-19 21:09:17 -0700148 ], ['_type=="executable" and is_special_test==1', {
149 'product_dir': '<(test_dir)-special',
150 },
brians343bc112013-02-10 01:53:46 +0000151 ],
152 ],
153 },
154 },
155 {
156 'target_name': 'ctemplate',
157 'type': 'none',
158 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800159 'libraries': ['<(compiled_abs)/ctemplate-<(ctemplate_version)-prefix/lib/libctemplate.a'],
brians343bc112013-02-10 01:53:46 +0000160 },
161 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800162 'include_dirs': ['<(compiled)/ctemplate-<(ctemplate_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +0000163 },
164 },
Brian Silverman798c7782013-03-28 16:48:02 -0700165 {
166 'target_name': 'gflags',
167 'type': 'none',
168 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800169 'libraries': ['<(compiled_abs)/gflags-<(gflags_version)-prefix/lib/libgflags.a'],
Brian Silverman798c7782013-03-28 16:48:02 -0700170 },
171 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800172 'include_dirs': ['<(compiled)/gflags-<(gflags_version)-prefix/include'],
Brian Silverman798c7782013-03-28 16:48:02 -0700173 },
174 },
175 {
Austin Schuh69155282013-10-27 14:52:35 -0700176 'target_name': 'libcdd',
177 'type': 'none',
178 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800179 'libraries': ['<(compiled_abs)/libcdd-<(libcdd_version)-prefix/lib/libcdd.a'],
Austin Schuh69155282013-10-27 14:52:35 -0700180 },
181 'direct_dependent_settings': {
Brian Silverman8f1018b2013-11-17 21:35:15 -0800182 'include_dirs': ['<(compiled_abs)/'],
Austin Schuh69155282013-10-27 14:52:35 -0700183 },
184 },
Brian Silverman6137a502013-04-22 15:41:36 -0700185 ],
brians343bc112013-02-10 01:53:46 +0000186}