Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: third_party/mesa/BUILD.gn

Issue 1473273002: GN(Android): Add libosmesa.so to ContentShell.apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/android/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 config("mesa_headers_config") { 7 config("mesa_headers_config") {
8 include_dirs = [ "src/include" ] 8 include_dirs = [ "src/include" ]
9 if (!use_x11) { 9 if (!use_x11) {
10 defines = [ "MESA_EGL_NO_X11_HEADERS" ] 10 defines = [ "MESA_EGL_NO_X11_HEADERS" ]
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 # Because we're building as a static library 669 # Because we're building as a static library
670 "_GLAPI_NO_EXPORTS", 670 "_GLAPI_NO_EXPORTS",
671 ] 671 ]
672 } 672 }
673 673
674 deps = [ 674 deps = [
675 ":mesa_headers", 675 ":mesa_headers",
676 ] 676 ]
677 } 677 }
678 678
679 if (!is_android) { # TODO(GYP) enable for Android. 679 # Building this target will hide the native OpenGL shared library and
680 # Building this target will hide the native OpenGL shared library and 680 # replace it with a slow software renderer.
681 # replace it with a slow software renderer. 681 #
682 # 682 # Note: on x64 Windows this target gives warnings to the effect of:
683 # Note: on x64 Windows this target gives warnings to the effect of: 683 # osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified
684 # osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified 684 # multiple times; using first specification
685 # multiple times; using first specification 685 # This also happens with the GYP build.
686 # This also happens with the GYP build. 686 loadable_module("osmesa") {
687 loadable_module("osmesa") { 687 sources = [
688 sources = [ 688 "src/src/mesa/drivers/common/driverfuncs.c",
689 "src/src/mesa/drivers/common/driverfuncs.c", 689 "src/src/mesa/drivers/common/driverfuncs.h",
690 "src/src/mesa/drivers/common/driverfuncs.h", 690 "src/src/mesa/drivers/common/meta.c",
691 "src/src/mesa/drivers/common/meta.c", 691 "src/src/mesa/drivers/common/meta.h",
692 "src/src/mesa/drivers/common/meta.h", 692 "src/src/mesa/drivers/osmesa/osmesa.c",
693 "src/src/mesa/drivers/osmesa/osmesa.c", 693 ]
694
695 configs -= [ "//build/config/compiler:chromium_code" ]
696 configs += [
697 ":mesa_headers_config",
698 "//build/config/compiler:no_chromium_code",
699 ]
700 previous_configs = configs
701 configs = []
702 configs = [ ":mesa_internal_config" ] + previous_configs +
703 [ ":mesa_internal_warnings" ]
704
705 include_dirs = [ "src/src/mesa/drivers" ]
706
707 if (is_clang) {
708 # Mesa triggers some of these Clang warnings.
709 configs -= [ "//build/config/clang:extra_warnings" ]
710 }
711
712 if (is_win) {
713 ldflags = [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
714 root_build_dir) ]
715 }
716
717 deps = [
718 ":mesa",
719 ":mesa_headers",
720 ":mesa_libglslcommon",
721 "//build/config/sanitizers:deps",
722 ]
723
724 if (is_win) {
725 defines = [
726 "BUILD_GL32",
727 "KEYWORD1=GLAPI",
728 "KEYWORD2=GLAPIENTRY",
694 ] 729 ]
695
696 configs -= [ "//build/config/compiler:chromium_code" ]
697 configs += [
698 ":mesa_headers_config",
699 "//build/config/compiler:no_chromium_code",
700 ]
701 previous_configs = configs
702 configs = []
703 configs = [ ":mesa_internal_config" ] + previous_configs +
704 [ ":mesa_internal_warnings" ]
705
706 include_dirs = [ "src/src/mesa/drivers" ]
707
708 if (is_clang) {
709 # Mesa triggers some of these Clang warnings.
710 configs -= [ "//build/config/clang:extra_warnings" ]
711 }
712
713 if (is_win) {
714 ldflags =
715 [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
716 root_build_dir) ]
717 }
718
719 deps = [
720 ":mesa",
721 ":mesa_headers",
722 ":mesa_libglslcommon",
723 "//build/config/sanitizers:deps",
724 ]
725
726 if (is_win) {
727 defines = [
728 "BUILD_GL32",
729 "KEYWORD1=GLAPI",
730 "KEYWORD2=GLAPIENTRY",
731 ]
732 }
733 } 730 }
734 } else { 731 }
735 # Placeholder to allow targets to unconditionally depend on this.
736 group("osmesa") {
737 }
738 } # !is_android
739
740 # TODO(GYP) Android osmesa_in_lib_dir target.
741 732
742 if (is_linux) { 733 if (is_linux) {
743 config("wayland_drm_protocol_config") { 734 config("wayland_drm_protocol_config") {
744 include_dirs = [ "$generated_src_dir/egl/wayland/wayland-drm" ] 735 include_dirs = [ "$generated_src_dir/egl/wayland/wayland-drm" ]
745 } 736 }
746 737
747 source_set("wayland_drm_protocol") { 738 source_set("wayland_drm_protocol") {
748 sources = [ 739 sources = [
749 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-client-protocol.h" , 740 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-client-protocol.h" ,
750 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-protocol.c", 741 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-protocol.c",
751 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-server-protocol.h" , 742 "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-server-protocol.h" ,
752 ] 743 ]
753 744
754 deps = [ 745 deps = [
755 "//third_party/wayland:wayland_util", 746 "//third_party/wayland:wayland_util",
756 ] 747 ]
757 748
758 configs -= [ "//build/config/compiler:chromium_code" ] 749 configs -= [ "//build/config/compiler:chromium_code" ]
759 configs += [ "//build/config/compiler:no_chromium_code" ] 750 configs += [ "//build/config/compiler:no_chromium_code" ]
760 751
761 public_configs = [ ":wayland_drm_protocol_config" ] 752 public_configs = [ ":wayland_drm_protocol_config" ]
762 } 753 }
763 } 754 }
OLDNEW
« no previous file with comments | « content/shell/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698