summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/mac/libraries/subdir
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/mac/libraries/subdir')
-rw-r--r--third_party/python/gyp/test/mac/libraries/subdir/README.txt1
-rw-r--r--third_party/python/gyp/test/mac/libraries/subdir/hello.cc10
-rw-r--r--third_party/python/gyp/test/mac/libraries/subdir/mylib.c7
-rw-r--r--third_party/python/gyp/test/mac/libraries/subdir/test.gyp65
4 files changed, 83 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/mac/libraries/subdir/README.txt b/third_party/python/gyp/test/mac/libraries/subdir/README.txt
new file mode 100644
index 0000000000..4031ded85f
--- /dev/null
+++ b/third_party/python/gyp/test/mac/libraries/subdir/README.txt
@@ -0,0 +1 @@
+Make things live in a subdirectory, to make sure that DEPTH works correctly.
diff --git a/third_party/python/gyp/test/mac/libraries/subdir/hello.cc b/third_party/python/gyp/test/mac/libraries/subdir/hello.cc
new file mode 100644
index 0000000000..a43554c8ca
--- /dev/null
+++ b/third_party/python/gyp/test/mac/libraries/subdir/hello.cc
@@ -0,0 +1,10 @@
+// Copyright (c) 2012 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <iostream>
+
+int main() {
+ std::cout << "Hello, world!" << std::endl;
+ return 0;
+}
diff --git a/third_party/python/gyp/test/mac/libraries/subdir/mylib.c b/third_party/python/gyp/test/mac/libraries/subdir/mylib.c
new file mode 100644
index 0000000000..e771991e83
--- /dev/null
+++ b/third_party/python/gyp/test/mac/libraries/subdir/mylib.c
@@ -0,0 +1,7 @@
+// Copyright (c) 2012 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+int my_foo(int x) {
+ return x + 1;
+}
diff --git a/third_party/python/gyp/test/mac/libraries/subdir/test.gyp b/third_party/python/gyp/test/mac/libraries/subdir/test.gyp
new file mode 100644
index 0000000000..59fef51017
--- /dev/null
+++ b/third_party/python/gyp/test/mac/libraries/subdir/test.gyp
@@ -0,0 +1,65 @@
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'libraries-test',
+ 'type': 'executable',
+ 'sources': [
+ 'hello.cc',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ 'libcrypto.dylib',
+ ],
+ },
+ },
+ {
+ # This creates a static library and puts it in a nonstandard location for
+ # libraries-search-path-test.
+ 'target_name': 'mylib',
+ 'type': 'static_library',
+ 'sources': [
+ 'mylib.c',
+ ],
+ 'postbuilds': [
+ {
+ 'postbuild_name': 'Make a secret location',
+ 'action': [
+ 'mkdir',
+ '-p',
+ '${SRCROOT}/../secret_location',
+ ],
+ },
+ {
+ 'postbuild_name': 'Copy to secret location, with secret name',
+ 'action': [
+ 'cp',
+ '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
+ '${SRCROOT}/../secret_location/libmysecretlib.a',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'libraries-search-path-test',
+ 'type': 'executable',
+ 'dependencies': [ 'mylib' ],
+ 'sources': [
+ 'hello.cc',
+ ],
+ 'xcode_settings': {
+ 'LIBRARY_SEARCH_PATHS': [
+ '<(DEPTH)/secret_location',
+ ],
+ },
+ 'link_settings': {
+ 'libraries': [
+ 'libmysecretlib.a',
+ ],
+ },
+ },
+ ],
+}