summaryrefslogtreecommitdiffstats
path: root/o3d/build
diff options
context:
space:
mode:
authortschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-01 22:06:16 +0000
committertschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-01 22:06:16 +0000
commit5ede92f13da3dbb0f1e6b888c7f3fc2b75158647 (patch)
treeadfc0c2340af468cfa6d908a844e11e45bafcb89 /o3d/build
parent3aa165b577d59d8a493ab1e95969295e901d6940 (diff)
downloadchromium_src-5ede92f13da3dbb0f1e6b888c7f3fc2b75158647.zip
chromium_src-5ede92f13da3dbb0f1e6b888c7f3fc2b75158647.tar.gz
chromium_src-5ede92f13da3dbb0f1e6b888c7f3fc2b75158647.tar.bz2
Add build rules for cairo, pixman, and pkg-config on Mac. (Not yet being used.)
TEST=added them as dependencies to a real target and verified they were built successfully BUG=none Review URL: http://codereview.chromium.org/6591079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/build')
-rw-r--r--o3d/build/cairo.gyp78
-rw-r--r--o3d/build/common.gypi5
-rw-r--r--o3d/build/pixman.gyp55
-rw-r--r--o3d/build/pkg-config.gyp54
4 files changed, 192 insertions, 0 deletions
diff --git a/o3d/build/cairo.gyp b/o3d/build/cairo.gyp
new file mode 100644
index 0000000..433b53e
--- /dev/null
+++ b/o3d/build/cairo.gyp
@@ -0,0 +1,78 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'cairobuilddir': '<(SHARED_INTERMEDIATE_DIR)/cairo',
+ },
+ 'includes': [
+ 'common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'cairo',
+ 'type': 'none',
+ 'conditions': [
+ ['OS == "mac"',
+ {
+ 'dependencies': [
+ 'pixman.gyp:pixman',
+ 'pkg-config.gyp:pkg-config',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'build_cairo',
+ 'inputs': [
+ # Tragically, GYP/XCode has a limitation on the number of
+ # inputs that an action may have, and cairo's 3000+ files is
+ # over the limit, so we declare a dependency on only the first
+ # 2000 files. This is fine because any update to a newer
+ # version of cairo is likely to modify at least one of those
+ # files, which is sufficient to re-run the action.
+ '<!@(find ../../<(cairodir) -name .svn -prune -o -type f '
+ '-print | head -n 2000)',
+ ],
+ 'inputs': [
+ # The cairo build won't actually read this file at all, but
+ # it does read the installed pixman headers, so if pixman has
+ # been rebuilt then we want cairo to be rebuilt too and it is
+ # simpler to just list this file than list all the pixman
+ # headers.
+ '<(pkgconfigroot)/usr/lib/libpixman-1.a',
+ ],
+ 'outputs': [
+ '<(pkgconfigroot)/usr/lib/libcairo.a',
+ # There are other outputs but it is sufficient to just list
+ # one.
+ ],
+ 'action': [
+ 'sh',
+ '-c',
+ # Delete existing build directory, if any.
+ 'rm -rf <(cairobuilddir) && '
+ # Copy the cairo tree to the build directory.
+ 'cp -r ../../<(cairodir) <(cairobuilddir) && '
+ # Go there!
+ 'cd <(cairobuilddir) && '
+ # Put our pkg-config binary into the PATH so cairo's build can
+ # find it.
+ 'PATH=<(pkgconfigroot)/usr/bin:$PATH && '
+ # Configure it. We disable png and svg because we don't need
+ # them and they require additional external dependencies to
+ # build.
+ './configure --prefix=<(pkgconfigroot)/usr --disable-shared '
+ '--disable-png --disable-svg && '
+ # Build.
+ 'make && '
+ # "Install" to pkgconfigroot.
+ 'make install',
+ ],
+ },
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}
diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi
index 2afc49a..2e848fd 100644
--- a/o3d/build/common.gypi
+++ b/o3d/build/common.gypi
@@ -6,6 +6,7 @@
'variables': {
'antlrdir': 'third_party/antlr3',
'breakpaddir': 'breakpad/src',
+ 'cairodir': 'third_party/cairo',
'fcolladadir': 'third_party/fcollada/files',
'glewdir': 'third_party/glew/files',
'gtestdir': 'testing/gtest/include',
@@ -15,12 +16,16 @@
'nixysadir': 'o3d/third_party/nixysa',
'npapidir': 'o3d/third_party/npapi',
'pdiffdir': 'third_party/pdiff/files',
+ 'pixmandir': 'third_party/pixman',
+ 'pkgconfigdir': 'third_party/pkg-config',
'pngdir': 'third_party/libpng',
'screenshotsdir': 'o3d_assets/tests/screenshots',
'seleniumdir': 'third_party/selenium_rc/files',
'skiadir': 'third_party/skia/include',
'txcdir': 'third_party/libtxc_dxtn/files',
'zlibdir': 'third_party/zlib',
+
+ 'pkgconfigroot': '<(SHARED_INTERMEDIATE_DIR)/pkgconfigroot',
# Hack to ensure that these variables (specifically "renderer") are
# available later in the file. Long term solution is late
diff --git a/o3d/build/pixman.gyp b/o3d/build/pixman.gyp
new file mode 100644
index 0000000..b3a794a
--- /dev/null
+++ b/o3d/build/pixman.gyp
@@ -0,0 +1,55 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'pixmanbuilddir': '<(SHARED_INTERMEDIATE_DIR)/pixman',
+ },
+ 'includes': [
+ 'common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pixman',
+ 'type': 'none',
+ 'conditions': [
+ ['OS == "mac"',
+ {
+ 'actions': [
+ {
+ 'action_name': 'build_pixman',
+ 'inputs': [
+ '<!@(find ../../<(pixmandir) -name .svn -prune -o -type f '
+ '-print)',
+ ],
+ 'outputs': [
+ '<(pkgconfigroot)/usr/lib/libpixman-1.a',
+ # There are other outputs but it is sufficient to just list
+ # one.
+ ],
+ 'action': [
+ 'sh',
+ '-c',
+ # Delete existing build directory, if any.
+ 'rm -rf <(pixmanbuilddir) && '
+ # Copy the pixman tree to the build directory.
+ 'cp -r ../../<(pixmandir) <(pixmanbuilddir) && '
+ # Go there!
+ 'cd <(pixmanbuilddir) && '
+ # Configure it.
+ './configure --prefix=<(pkgconfigroot)/usr --disable-shared '
+ '&& '
+ # Build.
+ 'make && '
+ # "Install" to pkgconfigroot.
+ 'make install',
+ ],
+ },
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}
diff --git a/o3d/build/pkg-config.gyp b/o3d/build/pkg-config.gyp
new file mode 100644
index 0000000..81fe308
--- /dev/null
+++ b/o3d/build/pkg-config.gyp
@@ -0,0 +1,54 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'pkgconfigbuilddir': '<(SHARED_INTERMEDIATE_DIR)/pkg-config',
+ },
+ 'includes': [
+ 'common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'pkg-config',
+ 'type': 'none',
+ 'conditions': [
+ ['OS == "mac"',
+ {
+ 'actions': [
+ {
+ 'action_name': 'build_pkgconfig',
+ 'inputs': [
+ '<!@(find ../../<(pkgconfigdir) -name .svn -prune -o -type f '
+ '-print)',
+ ],
+ 'outputs': [
+ '<(pkgconfigroot)/usr/bin/pkg-config',
+ # There are other outputs but it is sufficient to just list
+ # one.
+ ],
+ 'action': [
+ 'sh',
+ '-c',
+ # Delete existing build directory, if any.
+ 'rm -rf <(pkgconfigbuilddir) && '
+ # Copy the pkg-config tree to the build directory.
+ 'cp -r ../../<(pkgconfigdir) <(pkgconfigbuilddir) && '
+ # Go there!
+ 'cd <(pkgconfigbuilddir) && '
+ # Configure it.
+ './configure --prefix=<(pkgconfigroot)/usr && '
+ # Build.
+ 'make && '
+ # "Install" to pkgconfigroot.
+ 'make install',
+ ],
+ },
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}