diff --git a/layers/meta-belden-coreos/recipes-demo/cmake-demo/cmake-demo_0.1.bb b/layers/meta-belden-coreos/recipes-demo/cmake-demo/cmake-demo_0.1.bb index 33e2d5c..931954e 100644 --- a/layers/meta-belden-coreos/recipes-demo/cmake-demo/cmake-demo_0.1.bb +++ b/layers/meta-belden-coreos/recipes-demo/cmake-demo/cmake-demo_0.1.bb @@ -1,22 +1,20 @@ -#Example how to make a recipe that uses CMake for building -#Please note that this is a recipe to build the package. For package to be added to an Image, another recipe needs to be changed. -#Example: This package is added to be part of coreos-image-full-cmdline image. -#A new line: IMAGE_INSTALL += "cmake-demo" is added to layers/meta-belden-coreos/recipes-core/images/coreos-image-full-cmdline.bb +# Example how to make a recipe that uses CMake for building +# Please note that this is a recipe to build the package. For package to be added to an Image, another recipe needs to be changed. +# Example: This package is added to be part of coreos-image-full-cmdline image. +# A new line: IMAGE_INSTALL += "cmake-demo" is added to layers/meta-belden-coreos/recipes-core/images/coreos-image-full-cmdline.bb DESCRIPTION = "Simple helloworld cmake application" -#Recipe must include a licence +# Recipe must include a licence LICENSE = "CLOSED" -#Revision of this recipe (optional) +# Revision of this recipe (optional) PR = "r1" -SYSTEMD_AUTO_ENABLE = "enable" - -#Systemd file +# Systemd file SYSTEMD_SERVICE_${PN} = "hello.service" -#Recipe needs to know where the needed files are +# Recipe needs to know where the needed files are SRC_URI += "file://CMakeLists.txt\ file://lib/CMakeLists.txt \ file://src/CMakeLists.txt \ @@ -25,19 +23,19 @@ SRC_URI += "file://CMakeLists.txt\ file://lib/lib-demo.c \ file://lib/lib-demo.h" -#List of files and directories that are placed in a package +# List of files and directories that are placed in a package FILES:${PN} += "${systemd_unitdir}/system/hello.service" -#Temporary work directory for each recipe where extracted source files are kept +# Temporary work directory for each recipe where extracted source files are kept S="${WORKDIR}" -#CMake will do most of the work, so it needs to be inherited +# CMake will do most of the work, so it needs to be inherited inherit cmake systemd -#Passing any needed configure options to CMake +# Passing any needed configure options to CMake EXTRA_OECMAKE = "" -#Systemd service is being installed using this function (this is an example). Other files are installed using CMake +# Systemd service is being installed using this function (this is an example). Other files are installed using CMake do_install:append() { install -d ${D}/${systemd_unitdir}/system install -m 0644 ${WORKDIR}/src/hello.service ${D}/${systemd_unitdir}/system diff --git a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/CMakeLists.txt b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/CMakeLists.txt index c22b9e4..9b60eae 100644 --- a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/CMakeLists.txt +++ b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/CMakeLists.txt @@ -1,15 +1,15 @@ -#Top CMakeLists.txt file +# Top CMakeLists.txt file -#Firstly a minimum required version of CMake is specified +# Firstly a minimum required version of CMake is specified cmake_minimum_required(VERSION 3.5) -#Name the project, and give a version +# Name the project, and give a version project(cmake_demo VERSION 0.0.1) -#Setting build logs to verbose (usefull for debugging) +# Setting build logs to verbose (usefull for debugging) set(CMAKE_VERBOSE_MAKEFILE ON) -#Adding subdirectories that contain CMakeLists.txt +# Adding subdirectories that contain CMakeLists.txt add_subdirectory(lib) add_subdirectory(src) diff --git a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/lib/CMakeLists.txt b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/lib/CMakeLists.txt index b075ba3..4d24d60 100644 --- a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/lib/CMakeLists.txt +++ b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -#CMakeLists.txt file is gets some info from top CMakeLists.txt file (Minimum required version, Project name), so its not needed to redefine it here +# CMakeLists.txt file is gets some info from top CMakeLists.txt file (Minimum required version, Project name), so its not needed to redefine it here # Declare the library target. @@ -13,5 +13,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJ # Set the public header property to the one with the actual API. set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER lib-demo.h) -#Install library and dependency file +# Install library and dependency file install (TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include) diff --git a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/CMakeLists.txt b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/CMakeLists.txt index 4293866..5f9d124 100644 --- a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/CMakeLists.txt +++ b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/CMakeLists.txt @@ -1,7 +1,7 @@ -#CMakeLists.txt file is gets some info from top CMakeLists.txt file (Minimum required version, Project name), so its not needed to redefine it here +# CMakeLists.txt file is gets some info from top CMakeLists.txt file (Minimum required version, Project name), so its not needed to redefine it here -#Create binary +# Create binary add_executable(helloworld helloworld.c) -#Install binary +# Install binary install(TARGETS helloworld RUNTIME DESTINATION bin) diff --git a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/hello.service b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/hello.service index b48497f..1ee1d6e 100644 --- a/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/hello.service +++ b/layers/meta-belden-coreos/recipes-demo/cmake-demo/files/src/hello.service @@ -1,4 +1,4 @@ -#Systemd service file +# Systemd service file [Unit] Description=GNU Hello World startup script for KOAN training course