summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.cmake.managedbuilder/templates
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.cmake.managedbuilder/templates')
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt34
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c21
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties31
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml61
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt34
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp21
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties31
-rw-r--r--plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml61
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 @@
1cmake_minimum_required (VERSION 2.8.1)
2
3######## Project settings ########
4PROJECT($(projectName))
5SET(LICENSE "TBD")
6
7######## Build and include settings ########
8include_directories(
9 inc
10)
11
12link_directories(
13 ${LINK_DIRECTORIES}
14)
15
16
17file(GLOB SOURCES
18 "src/*.c"
19)
20
21add_executable(
22 $(projectName)
23
24 ${SOURCES}
25)
26
27TARGET_LINK_LIBRARIES(
28 $(projectName)
29)
30
31######## Install targets ########
32INSTALL(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 */
16int 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
13template.vendor=Yocto Project
14template.name=Hello World C CMake Project
15template.description=A simple C hello world project based on CMake
16
17# General Settings
18general.name=General settings
19general.description=Author properties of the project
20general.author.name=Author
21general.author.description=The author of the project
22general.author.default=anonymous
23general.email.name=Email address
24general.email.description=The email address of the project's author
25general.email.default=anony@mo.us
26general.vendor.name=Vendor
27general.vendor.description=The vendor of the project
28general.vendor.default=None
29general.projectVersion.name=Version
30general.projectVersion.description=The version of the project
31general.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 @@
1cmake_minimum_required (VERSION 2.8.1)
2
3######## Project settings ########
4PROJECT($(projectName))
5SET(LICENSE "TBD")
6
7######## Build and include settings ########
8include_directories(
9 inc
10)
11
12link_directories(
13 ${LINK_DIRECTORIES}
14)
15
16
17file(GLOB SOURCES
18 "src/*.cpp"
19)
20
21add_executable(
22 $(projectName)
23
24 ${SOURCES}
25)
26
27TARGET_LINK_LIBRARIES(
28 $(projectName)
29)
30
31######## Install targets ########
32INSTALL(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 */
16int 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
13template.vendor=Yocto Project
14template.name=Hello World C++ CMake Project
15template.description=A simple C++ hello world project based on CMake
16
17# General Settings
18general.name=General settings
19general.description=Author properties of the project
20general.author.name=Author
21general.author.description=The author of the project
22general.author.default=anonymous
23general.email.name=Email address
24general.email.description=The email address of the project's author
25general.email.default=anony@mo.us
26general.vendor.name=Vendor
27general.vendor.description=The vendor of the project
28general.vendor.default=None
29general.projectVersion.name=Version
30general.projectVersion.description=The version of the project
31general.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>