blob: d4bce22ebb4bb6eb87909cfe5ba9a5d0b7786b12 [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',
brians343bc112013-02-10 01:53:46 +000021 },
22 'targets': [
23 {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080024 'target_name': 'WPILib',
Austin Schuh010eb812014-10-25 18:06:49 -070025 'type': 'static_library',
Brian Silverman7ffa0a52015-01-10 22:15:40 -080026 'variables': {
27 'header_dirs': [
28 '<(allwpilib)/wpilibc/wpilibC++/include',
29 '<(allwpilib)/wpilibc/wpilibC++Devices/include',
30 '<(allwpilib)/hal/include',
31 '<(allwpilib)/hal/lib/Athena/FRC_FPGA_ChipObject',
32 ],
33 },
Austin Schuh010eb812014-10-25 18:06:49 -070034 'include_dirs': [
Brian Silverman7ffa0a52015-01-10 22:15:40 -080035 '<@(header_dirs)'
36 ],
37 'cflags': [
38 '-Wno-error=unused-parameter',
39 '-Wno-error=switch-enum',
40 ],
41 'sources': [
42 '<!@(ls <(allwpilib)/wpilibc/wpilibC++/src/*.cpp)',
43 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/*.cpp)',
44 '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/Internal/*.cpp)',
45 '<!@(ls <(allwpilib)/hal/lib/Athena/*.cpp)',
46 '<!@(ls <(allwpilib)/hal/lib/Athena/ctre/*.cpp)',
Austin Schuh010eb812014-10-25 18:06:49 -070047 ],
48 'link_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080049 'library_dirs': [
50 '<(allwpilib)/ni-libraries',
51 ],
Austin Schuh010eb812014-10-25 18:06:49 -070052 'libraries': [
Austin Schuh010eb812014-10-25 18:06:49 -070053 '-lpthread',
54 '-lFRC_NetworkCommunication',
55 '-lRoboRIO_FRC_ChipObject',
56 '-lNiFpgaLv',
57 '-lNiFpga',
58 '-lNiRioSrv',
59 '-lspi',
60 '-li2c',
Austin Schuh010eb812014-10-25 18:06:49 -070061 ],
62 },
63 'direct_dependent_settings': {
Brian Silverman7ffa0a52015-01-10 22:15:40 -080064 'include_dirs': [
65 '<@(header_dirs)'
Austin Schuh010eb812014-10-25 18:06:49 -070066 ],
67 },
68 },
69 {
Brian Silverman6ae77dd2013-03-29 22:28:08 -070070 'target_name': 'opencv',
71 'type': 'none',
72 'link_settings': {
73 'libraries': [
74 '-lopencv_core',
75 '-lopencv_imgproc',
76 ],
77 },
78 },
79 {
brians343bc112013-02-10 01:53:46 +000080 'target_name': 'libevent',
81 'type': 'none',
82 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080083 'libraries': ['<(compiled_abs)/libevent-<(libevent_version)-prefix/lib/libevent.a'],
Brian Silverman8efe23e2013-07-07 23:31:37 -070084 },
85 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -080086 'include_dirs': ['<(compiled)/libevent-<(libevent_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +000087 },
88 },
89 {
90 'target_name': 'eigen',
91 'type': 'none',
92 'direct_dependent_settings': {
Brian Silvermanefb993f2013-08-30 19:52:57 -070093 'cflags': [
94 '-isystem', '<(externals)/eigen-<(eigen_version)'
95 ],
brians343bc112013-02-10 01:53:46 +000096 },
97 },
98 {
99 'target_name': 'libjpeg',
100 'type': 'none',
101 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800102 'libraries': ['<(compiled_abs)/libjpeg/lib/libjpeg.a'],
Brian Silverman8f1018b2013-11-17 21:35:15 -0800103 'cflags': [
104 '-isystem', '<(compiled)',
105 ],
brians343bc112013-02-10 01:53:46 +0000106 },
107 },
108 {
brians2fdfc072013-02-26 05:35:15 +0000109# Dependents should only use the "gtest/gtest_prod.h" header.
110# This target is NOT the correct one for "aos/common/gtest_prod.h". That one is
111# aos/common/common.gyp:gtest_prod. This target just deals with setting up to
112# use the gtest header.
113 'target_name': 'gtest_prod',
114 'type': 'static_library',
115 'direct_dependent_settings': {
116 'include_dirs': [
117 '<(externals)/gtest-<(gtest_version)/include'
118 ],
119 },
120 },
121 {
brians343bc112013-02-10 01:53:46 +0000122 'target_name': 'gtest',
123 'type': 'static_library',
124 'sources': [
Brian Silverman29458232014-04-30 15:53:46 -0700125 '<(externals)/gtest-<(gtest_version)/src/gtest-all.cc',
126 '<(externals)/gtest-<(gtest_version)/fused-src/gtest/gtest_main.cc',
127 ],
128 'include_dirs': [
129 '<(externals)/gtest-<(gtest_version)',
brians343bc112013-02-10 01:53:46 +0000130 ],
brians2fdfc072013-02-26 05:35:15 +0000131 'dependencies': [
132 'gtest_prod',
133 ],
134 'export_dependent_settings': [
135 'gtest_prod',
136 ],
brians343bc112013-02-10 01:53:46 +0000137 'cflags!': ['-Werror'],
138 'direct_dependent_settings': {
139 'include_dirs': ['<(externals)/gtest-<(gtest_version)/include'],
140 'target_conditions': [
Brian Silvermanb79131d2013-09-19 21:09:17 -0700141 ['_type=="executable" and is_special_test==0', {
brians343bc112013-02-10 01:53:46 +0000142 'product_dir': '<(test_dir)',
143 },
Brian Silvermanb79131d2013-09-19 21:09:17 -0700144 ], ['_type=="executable" and is_special_test==1', {
145 'product_dir': '<(test_dir)-special',
146 },
brians343bc112013-02-10 01:53:46 +0000147 ],
148 ],
149 },
150 },
151 {
152 'target_name': 'ctemplate',
153 'type': 'none',
154 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800155 'libraries': ['<(compiled_abs)/ctemplate-<(ctemplate_version)-prefix/lib/libctemplate.a'],
brians343bc112013-02-10 01:53:46 +0000156 },
157 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800158 'include_dirs': ['<(compiled)/ctemplate-<(ctemplate_version)-prefix/include'],
brians343bc112013-02-10 01:53:46 +0000159 },
160 },
Brian Silverman798c7782013-03-28 16:48:02 -0700161 {
162 'target_name': 'gflags',
163 'type': 'none',
164 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800165 'libraries': ['<(compiled_abs)/gflags-<(gflags_version)-prefix/lib/libgflags.a'],
Brian Silverman798c7782013-03-28 16:48:02 -0700166 },
167 'direct_dependent_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800168 'include_dirs': ['<(compiled)/gflags-<(gflags_version)-prefix/include'],
Brian Silverman798c7782013-03-28 16:48:02 -0700169 },
170 },
171 {
Austin Schuh69155282013-10-27 14:52:35 -0700172 'target_name': 'libcdd',
173 'type': 'none',
174 'link_settings': {
Brian Silvermanf10de2a2013-11-16 19:56:11 -0800175 'libraries': ['<(compiled_abs)/libcdd-<(libcdd_version)-prefix/lib/libcdd.a'],
Austin Schuh69155282013-10-27 14:52:35 -0700176 },
177 'direct_dependent_settings': {
Brian Silverman8f1018b2013-11-17 21:35:15 -0800178 'include_dirs': ['<(compiled_abs)/'],
Austin Schuh69155282013-10-27 14:52:35 -0700179 },
180 },
Brian Silverman6137a502013-04-22 15:41:36 -0700181 ],
brians343bc112013-02-10 01:53:46 +0000182}