summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src')
-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
2 files changed, 55 insertions, 0 deletions
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}