diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:23:09 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:24:09 +0200 |
commit | c7da892cb23d50d4d85746c9a0b6b14bf570989d (patch) | |
tree | e7136073f386d6156f51766c498c52c30c8df85f /plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src | |
download | eclipse-poky-kepler-c7da892cb23d50d4d85746c9a0b6b14bf570989d.tar.gz |
initial commit for Enea Linux 4.0daisy
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src')
2 files changed, 55 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 | } | ||