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("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
6 if (is_posix) { | 6 if (is_posix) { |
7 import("//build/config/gcc/gcc_version.gni") | 7 import("//build/config/gcc/gcc_version.gni") |
8 } | 8 } |
9 | 9 |
10 config("mesa_headers_config") { | 10 config("mesa_headers_config") { |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 ":mesa_headers", | 647 ":mesa_headers", |
648 ] | 648 ] |
649 } | 649 } |
650 | 650 |
651 if (!is_android) { # TODO(GYP) enable for Android. | 651 if (!is_android) { # TODO(GYP) enable for Android. |
652 # Building this target will hide the native OpenGL shared library and | 652 # Building this target will hide the native OpenGL shared library and |
653 # replace it with a slow software renderer. | 653 # replace it with a slow software renderer. |
654 # TODO(GYP) http://crbug.com/380327 need support for loadable_module. | 654 # TODO(GYP) http://crbug.com/380327 need support for loadable_module. |
655 #loadable_module("osmesa") { | 655 #loadable_module("osmesa") { |
656 shared_library("osmesa") { | 656 shared_library("osmesa") { |
| 657 # Make sure this only gets used in tests. |
| 658 testonly = true |
| 659 |
657 sources = [ | 660 sources = [ |
658 "src/src/mesa/drivers/common/driverfuncs.c", | 661 "src/src/mesa/drivers/common/driverfuncs.c", |
659 "src/src/mesa/drivers/common/driverfuncs.h", | 662 "src/src/mesa/drivers/common/driverfuncs.h", |
660 "src/src/mesa/drivers/common/meta.c", | 663 "src/src/mesa/drivers/common/meta.c", |
661 "src/src/mesa/drivers/common/meta.h", | 664 "src/src/mesa/drivers/common/meta.h", |
662 "src/src/mesa/drivers/osmesa/osmesa.c", | 665 "src/src/mesa/drivers/osmesa/osmesa.c", |
663 "src/src/mesa/drivers/osmesa/osmesa.def", | 666 "src/src/mesa/drivers/osmesa/osmesa.def", |
664 ] | 667 ] |
665 | 668 |
666 configs -= [ "//build/config/compiler:chromium_code" ] | 669 configs -= [ "//build/config/compiler:chromium_code" ] |
667 configs += [ | 670 configs += [ |
668 ":mesa_headers_config", | 671 ":mesa_headers_config", |
669 "//build/config/compiler:no_chromium_code", | 672 "//build/config/compiler:no_chromium_code", |
670 ] | 673 ] |
671 previous_configs = configs | 674 previous_configs = configs |
672 configs = [] | 675 configs = [] |
673 configs = [ ":mesa_internal_config" ] + previous_configs | 676 configs = [ ":mesa_internal_config" ] + previous_configs |
674 | 677 |
675 include_dirs = [ "src/src/mesa/drivers" ] | 678 include_dirs = [ "src/src/mesa/drivers" ] |
676 | 679 |
677 if (is_clang) { | 680 if (is_clang) { |
678 # Mesa triggers some of these Clang warnings. | 681 # Mesa triggers some of these Clang warnings. |
679 configs -= [ "//build/config/clang:extra_warnings" ] | 682 configs -= [ "//build/config/clang:extra_warnings" ] |
680 } | 683 } |
681 | 684 |
682 deps = [ | 685 deps = [ |
| 686 ":mesa", |
683 ":mesa_headers", | 687 ":mesa_headers", |
684 ":mesa", | |
685 ":mesa_libglslcommon", | 688 ":mesa_libglslcommon", |
686 ] | 689 ] |
687 | 690 |
688 if (is_win) { | 691 if (is_win) { |
689 defines = [ | 692 defines = [ |
690 "BUILD_GL32", | 693 "BUILD_GL32", |
691 "KEYWORD1=GLAPI", | 694 "KEYWORD1=GLAPI", |
692 "KEYWORD2=GLAPIENTRY", | 695 "KEYWORD2=GLAPIENTRY", |
693 ] | 696 ] |
694 } | 697 } |
695 } | 698 } |
696 } else { | 699 } else { |
697 # Placeholder to allow targets to unconditionally depend on this. | 700 # Placeholder to allow targets to unconditionally depend on this. |
698 group("osmesa") { | 701 group("osmesa") { |
699 } | 702 } |
700 } # !is_android | 703 } # !is_android |
701 # TODO(GYP) Android osmesa_in_lib_dir target. | 704 # TODO(GYP) Android osmesa_in_lib_dir target. |
OLD | NEW |