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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 libs += [ "AppKit.framework", "CoreFoundation.framework" ] | 128 libs += [ "AppKit.framework", "CoreFoundation.framework" ] |
129 } | 129 } |
130 | 130 |
131 if (pdfium_bundle_freetype) { | 131 if (pdfium_bundle_freetype) { |
132 deps += [ "third_party:fx_freetype" ] | 132 deps += [ "third_party:fx_freetype" ] |
133 } else { | 133 } else { |
134 libs += [ "freetype" ] | 134 libs += [ "freetype" ] |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 # Targets below this are only visible within this file. | 138 source_set("test_support") { |
139 visibility = [ ":*" ] | 139 testonly = true |
| 140 sources = [ |
| 141 "testing/fx_string_testhelpers.cpp", |
| 142 "testing/fx_string_testhelpers.h", |
| 143 "testing/test_support.cpp", |
| 144 "testing/test_support.h", |
| 145 ] |
| 146 deps = [ |
| 147 "//testing/gmock", |
| 148 "//testing/gtest", |
| 149 ":pdfium", |
| 150 ] |
| 151 include_dirs = [ |
| 152 "." |
| 153 ] |
| 154 if (pdf_enable_v8) { |
| 155 deps += [ |
| 156 "//v8", |
| 157 "//v8:v8_libplatform", |
| 158 ] |
| 159 include_dirs += [ |
| 160 "//v8", |
| 161 "//v8/include", |
| 162 ] |
| 163 } |
| 164 configs -= [ "//build/config/compiler:chromium_code" ] |
| 165 configs += [ |
| 166 ":pdfium_config", |
| 167 "//build/config/compiler:no_chromium_code", |
| 168 ] |
| 169 } |
| 170 |
| 171 # Targets below this are only visible within this file (and to the |
| 172 # top-level gn_visibility target used to help gn_all build everything). |
| 173 visibility = [ |
| 174 ":*", |
| 175 "//:gn_visibility", |
| 176 ] |
140 | 177 |
141 static_library("fdrm") { | 178 static_library("fdrm") { |
142 sources = [ | 179 sources = [ |
143 "core/include/fdrm/fx_crypt.h", | 180 "core/include/fdrm/fx_crypt.h", |
144 "core/src/fdrm/crypto/fx_crypt.cpp", | 181 "core/src/fdrm/crypto/fx_crypt.cpp", |
145 "core/src/fdrm/crypto/fx_crypt_aes.cpp", | 182 "core/src/fdrm/crypto/fx_crypt_aes.cpp", |
146 "core/src/fdrm/crypto/fx_crypt_sha.cpp", | 183 "core/src/fdrm/crypto/fx_crypt_sha.cpp", |
147 ] | 184 ] |
148 configs -= [ "//build/config/compiler:chromium_code" ] | 185 configs -= [ "//build/config/compiler:chromium_code" ] |
149 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 186 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 ] | 1428 ] |
1392 } | 1429 } |
1393 | 1430 |
1394 test("pdfium_unittests") { | 1431 test("pdfium_unittests") { |
1395 sources = [ | 1432 sources = [ |
1396 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", | 1433 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", |
1397 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", | 1434 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", |
1398 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", | 1435 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", |
1399 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", | 1436 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", |
1400 "core/src/fxcrt/fx_system_unittest.cpp", | 1437 "core/src/fxcrt/fx_system_unittest.cpp", |
1401 "testing/fx_string_testhelpers.cpp", | |
1402 "testing/fx_string_testhelpers.h", | |
1403 "third_party/base/nonstd_unique_ptr_unittest.cpp", | 1438 "third_party/base/nonstd_unique_ptr_unittest.cpp", |
1404 "xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp", | 1439 "xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp", |
1405 "xfa/src/fxfa/src/parser/xfa_utils_imp_unittest.cpp", | 1440 "xfa/src/fxfa/src/parser/xfa_utils_imp_unittest.cpp", |
1406 ] | 1441 ] |
1407 deps = [ | 1442 deps = [ |
1408 "//testing/gtest", | 1443 "//testing/gtest", |
1409 "//testing/gtest:gtest_main", | 1444 "//testing/gtest:gtest_main", |
1410 ":pdfium" | 1445 ":pdfium", |
| 1446 ":test_support", |
1411 ] | 1447 ] |
1412 include_dirs = [ "." ] | 1448 include_dirs = [ "." ] |
1413 configs -= [ "//build/config/compiler:chromium_code" ] | 1449 configs -= [ "//build/config/compiler:chromium_code" ] |
1414 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 1450 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
1415 } | 1451 } |
1416 | 1452 |
1417 test("pdfium_embeddertests") { | 1453 test("pdfium_embeddertests") { |
1418 sources = [ | 1454 sources = [ |
1419 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", | 1455 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", |
1420 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", | 1456 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", |
1421 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", | 1457 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", |
1422 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", | 1458 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", |
1423 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", | 1459 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", |
1424 "fpdfsdk/src/fpdftext_embeddertest.cpp", | 1460 "fpdfsdk/src/fpdftext_embeddertest.cpp", |
1425 "fpdfsdk/src/fpdfview_c_api_test.c", | 1461 "fpdfsdk/src/fpdfview_c_api_test.c", |
1426 "fpdfsdk/src/fpdfview_c_api_test.h", | 1462 "fpdfsdk/src/fpdfview_c_api_test.h", |
1427 "fpdfsdk/src/fpdfview_embeddertest.cpp", | 1463 "fpdfsdk/src/fpdfview_embeddertest.cpp", |
1428 "testing/embedder_test.cpp", | 1464 "testing/embedder_test.cpp", |
1429 "testing/embedder_test.h", | 1465 "testing/embedder_test.h", |
1430 "testing/embedder_test_mock_delegate.h", | 1466 "testing/embedder_test_mock_delegate.h", |
1431 "testing/embedder_test_timer_handling_delegate.h", | 1467 "testing/embedder_test_timer_handling_delegate.h", |
1432 "testing/fx_string_testhelpers.cpp", | |
1433 "testing/fx_string_testhelpers.h", | |
1434 ] | 1468 ] |
1435 deps = [ | 1469 deps = [ |
1436 "//testing/gmock", | 1470 "//testing/gmock", |
1437 "//testing/gtest", | 1471 "//testing/gtest", |
1438 ":pdfium", | 1472 ":pdfium", |
| 1473 ":test_support", |
1439 ] | 1474 ] |
1440 include_dirs = [ | 1475 include_dirs = [ |
1441 "." | 1476 "." |
1442 ] | 1477 ] |
1443 if (pdf_enable_v8) { | 1478 if (pdf_enable_v8) { |
1444 sources += [ | 1479 sources += [ |
1445 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" | 1480 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" |
1446 ] | 1481 ] |
1447 deps += [ | 1482 deps += [ |
1448 "//v8", | 1483 "//v8", |
1449 "//v8:v8_libplatform", | 1484 "//v8:v8_libplatform", |
1450 ] | 1485 ] |
1451 include_dirs += [ | 1486 include_dirs += [ |
1452 "//v8", | 1487 "//v8", |
1453 "//v8/include", | 1488 "//v8/include", |
1454 ] | 1489 ] |
1455 } | 1490 } |
1456 configs -= [ "//build/config/compiler:chromium_code" ] | 1491 configs -= [ "//build/config/compiler:chromium_code" ] |
1457 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 1492 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
1458 } | 1493 } |
OLD | NEW |