summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/msvs/props
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/msvs/props')
-rw-r--r--third_party/python/gyp/test/msvs/props/AppName.props14
-rw-r--r--third_party/python/gyp/test/msvs/props/AppName.vsprops11
-rw-r--r--third_party/python/gyp/test/msvs/props/gyptest-props.py22
-rw-r--r--third_party/python/gyp/test/msvs/props/hello.c11
-rw-r--r--third_party/python/gyp/test/msvs/props/hello.gyp22
5 files changed, 80 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/msvs/props/AppName.props b/third_party/python/gyp/test/msvs/props/AppName.props
new file mode 100644
index 0000000000..b688f663d5
--- /dev/null
+++ b/third_party/python/gyp/test/msvs/props/AppName.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="UserMacros">
+ <AppName>Greet</AppName>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemGroup>
+ <BuildMacro Include="AppName">
+ <Value>$(AppName)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
diff --git a/third_party/python/gyp/test/msvs/props/AppName.vsprops b/third_party/python/gyp/test/msvs/props/AppName.vsprops
new file mode 100644
index 0000000000..84b9af3800
--- /dev/null
+++ b/third_party/python/gyp/test/msvs/props/AppName.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="Common"
+ >
+ <UserMacro
+ Name="AppName"
+ Value="Greet"
+ />
+</VisualStudioPropertySheet>
diff --git a/third_party/python/gyp/test/msvs/props/gyptest-props.py b/third_party/python/gyp/test/msvs/props/gyptest-props.py
new file mode 100644
index 0000000000..abd4df2241
--- /dev/null
+++ b/third_party/python/gyp/test/msvs/props/gyptest-props.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Verifies props files are added by using a
+props file to set the name of the built executable.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp(workdir='workarea_all', formats=['msvs'])
+
+test.run_gyp('hello.gyp')
+
+test.build('hello.gyp')
+
+test.built_file_must_exist('Greet.exe')
+
+test.pass_test()
diff --git a/third_party/python/gyp/test/msvs/props/hello.c b/third_party/python/gyp/test/msvs/props/hello.c
new file mode 100644
index 0000000000..faadc75e2c
--- /dev/null
+++ b/third_party/python/gyp/test/msvs/props/hello.c
@@ -0,0 +1,11 @@
+/* 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 <stdio.h>
+
+int main(void)
+{
+ printf("Hello, world!\n");
+ return 0;
+}
diff --git a/third_party/python/gyp/test/msvs/props/hello.gyp b/third_party/python/gyp/test/msvs/props/hello.gyp
new file mode 100644
index 0000000000..5a58317fa7
--- /dev/null
+++ b/third_party/python/gyp/test/msvs/props/hello.gyp
@@ -0,0 +1,22 @@
+# 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': 'hello',
+ 'product_name': '$(AppName)',
+ 'type': 'executable',
+ 'sources': [
+ 'hello.c',
+ ],
+ 'msvs_props': [
+ '$(SolutionDir)AppName.vsprops'
+ ],
+ 'msbuild_props': [
+ '$(SolutionDir)AppName.props'
+ ],
+ },
+ ],
+}
+