Stephen Kiazyk | e77dce2 | 2017-03-14 15:38:12 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | sourceFiles = [ |
| 16 | "frame_time_history.cpp", |
| 17 | "revision.cpp", |
| 18 | "revision_path.cpp", |
| 19 | "sync_util.cpp", |
| 20 | ] |
| 21 | |
| 22 | localIncludeFiles = [ |
| 23 | "include", |
| 24 | ] |
| 25 | |
| 26 | sharedLibraries = [ |
| 27 | "libbase", |
| 28 | "libcutils", |
| 29 | "liblog", |
| 30 | "libutils", |
| 31 | "libEGL", |
| 32 | "libGLESv2", |
| 33 | "libui", |
| 34 | "libgui", |
| 35 | "libhardware", |
| 36 | ] |
| 37 | |
| 38 | staticLibraries = ["libpdx_default_transport"] |
| 39 | |
| 40 | headerLibraries = [ |
| 41 | "libeigen", |
| 42 | ] |
| 43 | |
| 44 | cc_library { |
| 45 | srcs: sourceFiles, |
| 46 | local_include_dirs: localIncludeFiles, |
| 47 | |
| 48 | cflags: [ |
| 49 | "-DLOG_TAG=\"libdvrcommon\"", |
| 50 | "-DTRACE=0", |
| 51 | ], |
| 52 | export_include_dirs: localIncludeFiles, |
| 53 | |
| 54 | shared_libs: sharedLibraries, |
| 55 | static_libs: staticLibraries, |
| 56 | header_libs: headerLibraries, |
| 57 | export_header_lib_headers: headerLibraries, |
| 58 | |
| 59 | name: "libdvrcommon", |
| 60 | } |
| 61 | |
| 62 | testFiles = [ |
| 63 | "tests/numeric_test.cpp", |
| 64 | "tests/pose_test.cpp", |
| 65 | ] |
| 66 | |
| 67 | cc_test { |
| 68 | name: "libdvrcommon_test", |
| 69 | tags: ["optional"], |
| 70 | |
| 71 | srcs: testFiles, |
| 72 | |
| 73 | shared_libs: sharedLibraries, |
| 74 | |
| 75 | static_libs: [ |
| 76 | "libgmock_main", |
| 77 | "libgmock", |
| 78 | "libgtest", |
| 79 | "libdvrcommon", |
| 80 | ] + staticLibraries, |
| 81 | } |