diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:36:50 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 15:25:03 +0100 |
commit | 41ac47d732eed8392d60d0f6773e5a279d49b999 (patch) | |
tree | cf19d099db9cfdb8d73aa21c31e7aa1cc86ff860 /plugins/org.yocto.cmake.managedbuilder/templates | |
download | eclipse-poky-juno-master.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.cmake.managedbuilder/templates')
8 files changed, 294 insertions, 0 deletions
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt new file mode 100644 index 0000000..e6482a7 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | cmake_minimum_required (VERSION 2.8.1) | ||
2 | |||
3 | ######## Project settings ######## | ||
4 | PROJECT($(projectName)) | ||
5 | SET(LICENSE "TBD") | ||
6 | |||
7 | ######## Build and include settings ######## | ||
8 | include_directories( | ||
9 | inc | ||
10 | ) | ||
11 | |||
12 | link_directories( | ||
13 | ${LINK_DIRECTORIES} | ||
14 | ) | ||
15 | |||
16 | |||
17 | file(GLOB SOURCES | ||
18 | "src/*.c" | ||
19 | ) | ||
20 | |||
21 | add_executable( | ||
22 | $(projectName) | ||
23 | |||
24 | ${SOURCES} | ||
25 | ) | ||
26 | |||
27 | TARGET_LINK_LIBRARIES( | ||
28 | $(projectName) | ||
29 | ) | ||
30 | |||
31 | ######## Install targets ######## | ||
32 | INSTALL(TARGETS $(projectName) | ||
33 | RUNTIME DESTINATION usr/bin | ||
34 | ) | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c new file mode 100644 index 0000000..78b4e23 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c | |||
@@ -0,0 +1,21 @@ | |||
1 | /** @mainpage $(projectName) - $(vendor) | ||
2 | * | ||
3 | * @author $(author) <$(email)> | ||
4 | * @version $(projectVersion) | ||
5 | **/ | ||
6 | |||
7 | |||
8 | #include <stdio.h> | ||
9 | /** | ||
10 | * Main class of project $(projectName) | ||
11 | * | ||
12 | * @param argc the number of arguments | ||
13 | * @param argv the arguments from the commandline | ||
14 | * @returns exit code of the application | ||
15 | */ | ||
16 | int main(int argc, char **argv) { | ||
17 | // print a greeting to the console | ||
18 | printf("Hello World!\n"); | ||
19 | |||
20 | return 0; | ||
21 | } | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties new file mode 100644 index 0000000..bc37c1c --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties | |||
@@ -0,0 +1,31 @@ | |||
1 | #/******************************************************************************* | ||
2 | # * Copyright (c) 2013 BMW Car IT GmbH. | ||
3 | # * All rights reserved. This program and the accompanying materials | ||
4 | # * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | # * which accompanies this distribution, and is available at | ||
6 | # * http://www.eclipse.org/legal/epl-v10.html | ||
7 | # * | ||
8 | # * Contributors: | ||
9 | # * BMW Car IT - initial implementation | ||
10 | # *******************************************************************************/ | ||
11 | |||
12 | # Template | ||
13 | template.vendor=Yocto Project | ||
14 | template.name=Hello World C CMake Project | ||
15 | template.description=A simple C hello world project based on CMake | ||
16 | |||
17 | # General Settings | ||
18 | general.name=General settings | ||
19 | general.description=Author properties of the project | ||
20 | general.author.name=Author | ||
21 | general.author.description=The author of the project | ||
22 | general.author.default=anonymous | ||
23 | general.email.name=Email address | ||
24 | general.email.description=The email address of the project's author | ||
25 | general.email.default=anony@mo.us | ||
26 | general.vendor.name=Vendor | ||
27 | general.vendor.description=The vendor of the project | ||
28 | general.vendor.default=None | ||
29 | general.projectVersion.name=Version | ||
30 | general.projectVersion.description=The version of the project | ||
31 | general.projectVersion.default=1.0.0 | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml new file mode 100644 index 0000000..7c3774e --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml | |||
@@ -0,0 +1,61 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <template type="ProjTempl" | ||
3 | version="1.0" supplier="%template.vendor" revision="1.0" author="Atanas Gegov" | ||
4 | id="org.yocto.cmake.template.exe.helloWorldCCMakeProject" label="%template.name" | ||
5 | description="%template.description"> | ||
6 | |||
7 | <property-group id="general_settings" label="%general.name" | ||
8 | description="%general.description" type="PAGES-ONLY"> | ||
9 | <property id="author" label="%general.author.name" description="%general.author.description" | ||
10 | default="%general.author.default" type="input" hidden="false" mandatory="false" | ||
11 | persist="true" /> | ||
12 | |||
13 | <property id="email" label="%general.email.name" | ||
14 | description="%general.email.description" default="%general.email.default" | ||
15 | type="input" hidden="false" mandatory="false" persist="true" /> | ||
16 | |||
17 | <property id="vendor" label="%general.vendor.name" | ||
18 | description="%general.vendor.description" default="%general.vendor.default" | ||
19 | type="input" hidden="false" mandatory="false" persist="true" /> | ||
20 | |||
21 | <property id="projectVersion" label="%general.projectVersion.name" | ||
22 | description="%general.projectVersion.description" checkproject="false" | ||
23 | default="%general.projectVersion.default" type="input" | ||
24 | pattern="([0-9]\.){2}[0-9]" hidden="false" mandatory="false" persist="true" /> | ||
25 | </property-group> | ||
26 | |||
27 | <process type="org.yocto.sdk.ide.NewYoctoProject"> | ||
28 | <simple name="name" value="$(projectName)" /> | ||
29 | <simple name="artifactExtension" value="exe" /> | ||
30 | <simple name="isCProject" value="true" /> | ||
31 | <simple name="isEmptyProject" value="false" /> | ||
32 | <simple name="isAutotoolsProject" value="false" /> | ||
33 | <simple name="isCMakeProject" value="true" /> | ||
34 | </process> | ||
35 | |||
36 | <process type="org.eclipse.cdt.core.CreateSourceFolder"> | ||
37 | <simple name="projectName" value="$(projectName)" /> | ||
38 | <simple name="path" value="src" /> | ||
39 | </process> | ||
40 | |||
41 | <process type="org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder"> | ||
42 | <simple name="projectName" value="$(projectName)" /> | ||
43 | <simple name="path" value="inc" /> | ||
44 | </process> | ||
45 | |||
46 | <process type="org.eclipse.cdt.core.AddFiles"> | ||
47 | <simple name="projectName" value="$(projectName)" /> | ||
48 | <complex-array name="files"> | ||
49 | <element> | ||
50 | <simple name="source" value="src/main.c" /> | ||
51 | <simple name="target" value="src/main.c" /> | ||
52 | <simple name="replaceable" value="true" /> | ||
53 | </element> | ||
54 | <element> | ||
55 | <simple name="source" value="src/CMakeLists.txt" /> | ||
56 | <simple name="target" value="CMakeLists.txt" /> | ||
57 | <simple name="replaceable" value="true" /> | ||
58 | </element> | ||
59 | </complex-array> | ||
60 | </process> | ||
61 | </template> | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt new file mode 100644 index 0000000..0436959 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | cmake_minimum_required (VERSION 2.8.1) | ||
2 | |||
3 | ######## Project settings ######## | ||
4 | PROJECT($(projectName)) | ||
5 | SET(LICENSE "TBD") | ||
6 | |||
7 | ######## Build and include settings ######## | ||
8 | include_directories( | ||
9 | inc | ||
10 | ) | ||
11 | |||
12 | link_directories( | ||
13 | ${LINK_DIRECTORIES} | ||
14 | ) | ||
15 | |||
16 | |||
17 | file(GLOB SOURCES | ||
18 | "src/*.cpp" | ||
19 | ) | ||
20 | |||
21 | add_executable( | ||
22 | $(projectName) | ||
23 | |||
24 | ${SOURCES} | ||
25 | ) | ||
26 | |||
27 | TARGET_LINK_LIBRARIES( | ||
28 | $(projectName) | ||
29 | ) | ||
30 | |||
31 | ######## Install targets ######## | ||
32 | INSTALL(TARGETS $(projectName) | ||
33 | RUNTIME DESTINATION usr/bin | ||
34 | ) | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp new file mode 100644 index 0000000..78b4e23 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp | |||
@@ -0,0 +1,21 @@ | |||
1 | /** @mainpage $(projectName) - $(vendor) | ||
2 | * | ||
3 | * @author $(author) <$(email)> | ||
4 | * @version $(projectVersion) | ||
5 | **/ | ||
6 | |||
7 | |||
8 | #include <stdio.h> | ||
9 | /** | ||
10 | * Main class of project $(projectName) | ||
11 | * | ||
12 | * @param argc the number of arguments | ||
13 | * @param argv the arguments from the commandline | ||
14 | * @returns exit code of the application | ||
15 | */ | ||
16 | int main(int argc, char **argv) { | ||
17 | // print a greeting to the console | ||
18 | printf("Hello World!\n"); | ||
19 | |||
20 | return 0; | ||
21 | } | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties new file mode 100644 index 0000000..99e7047 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties | |||
@@ -0,0 +1,31 @@ | |||
1 | #/******************************************************************************* | ||
2 | # * Copyright (c) 2013 BMW Car IT GmbH. | ||
3 | # * All rights reserved. This program and the accompanying materials | ||
4 | # * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | # * which accompanies this distribution, and is available at | ||
6 | # * http://www.eclipse.org/legal/epl-v10.html | ||
7 | # * | ||
8 | # * Contributors: | ||
9 | # * BMW Car IT - initial implementation | ||
10 | # *******************************************************************************/ | ||
11 | |||
12 | # Template | ||
13 | template.vendor=Yocto Project | ||
14 | template.name=Hello World C++ CMake Project | ||
15 | template.description=A simple C++ hello world project based on CMake | ||
16 | |||
17 | # General Settings | ||
18 | general.name=General settings | ||
19 | general.description=Author properties of the project | ||
20 | general.author.name=Author | ||
21 | general.author.description=The author of the project | ||
22 | general.author.default=anonymous | ||
23 | general.email.name=Email address | ||
24 | general.email.description=The email address of the project's author | ||
25 | general.email.default=anony@mo.us | ||
26 | general.vendor.name=Vendor | ||
27 | general.vendor.description=The vendor of the project | ||
28 | general.vendor.default=None | ||
29 | general.projectVersion.name=Version | ||
30 | general.projectVersion.description=The version of the project | ||
31 | general.projectVersion.default=1.0.0 | ||
diff --git a/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml new file mode 100644 index 0000000..a664d8a --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml | |||
@@ -0,0 +1,61 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <template type="ProjTempl" | ||
3 | version="1.0" supplier="%template.vendor" revision="1.0" author="Atanas Gegov" | ||
4 | id="org.yocto.cmake.template.exe.helloWorldCPPCMakeProject" label="%template.name" | ||
5 | description="%template.description"> | ||
6 | |||
7 | <property-group id="general_settings" label="%general.name" | ||
8 | description="%general.description" type="PAGES-ONLY"> | ||
9 | <property id="author" label="%general.author.name" description="%general.author.description" | ||
10 | default="%general.author.default" type="input" hidden="false" mandatory="false" | ||
11 | persist="true" /> | ||
12 | |||
13 | <property id="email" label="%general.email.name" | ||
14 | description="%general.email.description" default="%general.email.default" | ||
15 | type="input" hidden="false" mandatory="false" persist="true" /> | ||
16 | |||
17 | <property id="vendor" label="%general.vendor.name" | ||
18 | description="%general.vendor.description" default="%general.vendor.default" | ||
19 | type="input" hidden="false" mandatory="false" persist="true" /> | ||
20 | |||
21 | <property id="projectVersion" label="%general.projectVersion.name" | ||
22 | description="%general.projectVersion.description" checkproject="false" | ||
23 | default="%general.projectVersion.default" type="input" | ||
24 | pattern="([0-9]\.){2}[0-9]" hidden="false" mandatory="false" persist="true" /> | ||
25 | </property-group> | ||
26 | |||
27 | <process type="org.yocto.sdk.ide.NewYoctoProject"> | ||
28 | <simple name="name" value="$(projectName)" /> | ||
29 | <simple name="artifactExtension" value="exe" /> | ||
30 | <simple name="isCProject" value="false" /> | ||
31 | <simple name="isEmptyProject" value="false" /> | ||
32 | <simple name="isAutotoolsProject" value="false" /> | ||
33 | <simple name="isCMakeProject" value="true" /> | ||
34 | </process> | ||
35 | |||
36 | <process type="org.eclipse.cdt.core.CreateSourceFolder"> | ||
37 | <simple name="projectName" value="$(projectName)" /> | ||
38 | <simple name="path" value="src" /> | ||
39 | </process> | ||
40 | |||
41 | <process type="org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder"> | ||
42 | <simple name="projectName" value="$(projectName)" /> | ||
43 | <simple name="path" value="inc" /> | ||
44 | </process> | ||
45 | |||
46 | <process type="org.eclipse.cdt.core.AddFiles"> | ||
47 | <simple name="projectName" value="$(projectName)" /> | ||
48 | <complex-array name="files"> | ||
49 | <element> | ||
50 | <simple name="source" value="src/main.cpp" /> | ||
51 | <simple name="target" value="src/main.cpp" /> | ||
52 | <simple name="replaceable" value="true" /> | ||
53 | </element> | ||
54 | <element> | ||
55 | <simple name="source" value="src/CMakeLists.txt" /> | ||
56 | <simple name="target" value="CMakeLists.txt" /> | ||
57 | <simple name="replaceable" value="true" /> | ||
58 | </element> | ||
59 | </complex-array> | ||
60 | </process> | ||
61 | </template> | ||