OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("pdfium.gni") | 6 import("pdfium.gni") |
7 | 7 |
8 config("pdfium_config") { | 8 config("pdfium_config") { |
9 cflags = [] | 9 cflags = [] |
10 include_dirs = [ "third_party/freetype/include" ] | 10 include_dirs = [ "third_party/freetype/include" ] |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 ] | 126 ] |
127 } | 127 } |
128 | 128 |
129 if (pdfium_bundle_freetype) { | 129 if (pdfium_bundle_freetype) { |
130 deps += [ "third_party:fx_freetype" ] | 130 deps += [ "third_party:fx_freetype" ] |
131 } else { | 131 } else { |
132 libs += [ "freetype" ] | 132 libs += [ "freetype" ] |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
| 136 source_set("test_support") { |
| 137 testonly = true |
| 138 sources = [ |
| 139 "testing/fx_string_testhelpers.cpp", |
| 140 "testing/fx_string_testhelpers.h", |
| 141 "testing/test_support.cpp", |
| 142 "testing/test_support.h", |
| 143 ] |
| 144 deps = [ |
| 145 "//testing/gmock", |
| 146 "//testing/gtest", |
| 147 ":pdfium", |
| 148 ] |
| 149 include_dirs = [ |
| 150 "." |
| 151 ] |
| 152 if (pdf_enable_v8) { |
| 153 deps += [ |
| 154 "//v8", |
| 155 "//v8:v8_libplatform", |
| 156 ] |
| 157 include_dirs += [ |
| 158 "//v8", |
| 159 "//v8/include", |
| 160 ] |
| 161 } |
| 162 configs -= [ "//build/config/compiler:chromium_code" ] |
| 163 configs += [ |
| 164 ":pdfium_config", |
| 165 "//build/config/compiler:no_chromium_code", |
| 166 ] |
| 167 } |
| 168 |
136 # Targets below this are only visible within this file (and to the | 169 # Targets below this are only visible within this file (and to the |
137 # top-level gn_visibility target used to help gn_all build everything). | 170 # top-level gn_visibility target used to help gn_all build everything). |
138 visibility = [ | 171 visibility = [ |
139 ":*", | 172 ":*", |
140 "//:gn_visibility", | 173 "//:gn_visibility", |
141 ] | 174 ] |
142 | 175 |
143 static_library("fdrm") { | 176 static_library("fdrm") { |
144 sources = [ | 177 sources = [ |
145 "core/include/fdrm/fx_crypt.h", | 178 "core/include/fdrm/fx_crypt.h", |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 757 } |
725 | 758 |
726 test("pdfium_unittests") { | 759 test("pdfium_unittests") { |
727 sources = [ | 760 sources = [ |
728 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", | 761 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", |
729 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", | 762 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", |
730 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", | 763 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", |
731 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", | 764 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", |
732 "core/src/fxcrt/fx_bidi_unittest.cpp", | 765 "core/src/fxcrt/fx_bidi_unittest.cpp", |
733 "core/src/fxcrt/fx_system_unittest.cpp", | 766 "core/src/fxcrt/fx_system_unittest.cpp", |
734 "testing/fx_string_testhelpers.cpp", | |
735 "testing/fx_string_testhelpers.h", | |
736 "third_party/base/nonstd_unique_ptr_unittest.cpp", | 767 "third_party/base/nonstd_unique_ptr_unittest.cpp", |
737 ] | 768 ] |
738 deps = [ | 769 deps = [ |
739 "//testing/gtest", | 770 "//testing/gtest", |
740 "//testing/gtest:gtest_main", | 771 "//testing/gtest:gtest_main", |
741 ":pdfium", | 772 ":pdfium", |
| 773 ":test_support", |
742 ] | 774 ] |
743 include_dirs = [ "." ] | 775 include_dirs = [ "." ] |
744 configs -= [ "//build/config/compiler:chromium_code" ] | 776 configs -= [ "//build/config/compiler:chromium_code" ] |
745 configs += [ | 777 configs += [ |
746 ":pdfium_config", | 778 ":pdfium_config", |
747 "//build/config/compiler:no_chromium_code", | 779 "//build/config/compiler:no_chromium_code", |
748 ] | 780 ] |
749 } | 781 } |
750 | 782 |
751 test("pdfium_embeddertests") { | 783 test("pdfium_embeddertests") { |
752 sources = [ | 784 sources = [ |
753 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", | 785 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", |
754 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", | 786 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", |
755 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", | 787 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", |
756 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", | 788 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", |
757 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", | 789 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", |
758 "fpdfsdk/src/fpdftext_embeddertest.cpp", | 790 "fpdfsdk/src/fpdftext_embeddertest.cpp", |
759 "fpdfsdk/src/fpdfview_c_api_test.c", | 791 "fpdfsdk/src/fpdfview_c_api_test.c", |
760 "fpdfsdk/src/fpdfview_c_api_test.h", | 792 "fpdfsdk/src/fpdfview_c_api_test.h", |
761 "fpdfsdk/src/fpdfview_embeddertest.cpp", | 793 "fpdfsdk/src/fpdfview_embeddertest.cpp", |
762 "testing/embedder_test.cpp", | 794 "testing/embedder_test.cpp", |
763 "testing/embedder_test.h", | 795 "testing/embedder_test.h", |
764 "testing/embedder_test_mock_delegate.h", | 796 "testing/embedder_test_mock_delegate.h", |
765 "testing/embedder_test_timer_handling_delegate.h", | 797 "testing/embedder_test_timer_handling_delegate.h", |
766 "testing/fx_string_testhelpers.cpp", | |
767 "testing/fx_string_testhelpers.h", | |
768 ] | 798 ] |
769 deps = [ | 799 deps = [ |
770 "//testing/gmock", | 800 "//testing/gmock", |
771 "//testing/gtest", | 801 "//testing/gtest", |
772 ":pdfium", | 802 ":pdfium", |
| 803 ":test_support", |
773 ] | 804 ] |
774 include_dirs = [ | 805 include_dirs = [ |
775 "." | 806 "." |
776 ] | 807 ] |
777 if (pdf_enable_v8) { | 808 if (pdf_enable_v8) { |
778 sources += [ | 809 sources += [ |
779 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" | 810 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" |
780 ] | 811 ] |
781 deps += [ | 812 deps += [ |
782 "//v8", | 813 "//v8", |
783 "//v8:v8_libplatform", | 814 "//v8:v8_libplatform", |
784 ] | 815 ] |
785 include_dirs += [ | 816 include_dirs += [ |
786 "//v8", | 817 "//v8", |
787 "//v8/include", | 818 "//v8/include", |
788 ] | 819 ] |
789 } | 820 } |
790 configs -= [ "//build/config/compiler:chromium_code" ] | 821 configs -= [ "//build/config/compiler:chromium_code" ] |
791 configs += [ | 822 configs += [ |
792 ":pdfium_config", | 823 ":pdfium_config", |
793 "//build/config/compiler:no_chromium_code", | 824 "//build/config/compiler:no_chromium_code", |
794 ] | 825 ] |
795 } | 826 } |
OLD | NEW |