docs: editing comments and removing config setting
Adding spaces to make comments more readable. Removing a config setting that is already default.
This commit is contained in:
parent
eee10303f8
commit
0b533c97c3
|
|
@ -1,22 +1,20 @@
|
||||||
#Example how to make a recipe that uses CMake for building
|
# 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.
|
# 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.
|
# 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
|
# 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"
|
DESCRIPTION = "Simple helloworld cmake application"
|
||||||
|
|
||||||
#Recipe must include a licence
|
# Recipe must include a licence
|
||||||
LICENSE = "CLOSED"
|
LICENSE = "CLOSED"
|
||||||
|
|
||||||
#Revision of this recipe (optional)
|
# Revision of this recipe (optional)
|
||||||
PR = "r1"
|
PR = "r1"
|
||||||
|
|
||||||
SYSTEMD_AUTO_ENABLE = "enable"
|
# Systemd file
|
||||||
|
|
||||||
#Systemd file
|
|
||||||
SYSTEMD_SERVICE_${PN} = "hello.service"
|
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\
|
SRC_URI += "file://CMakeLists.txt\
|
||||||
file://lib/CMakeLists.txt \
|
file://lib/CMakeLists.txt \
|
||||||
file://src/CMakeLists.txt \
|
file://src/CMakeLists.txt \
|
||||||
|
|
@ -25,19 +23,19 @@ SRC_URI += "file://CMakeLists.txt\
|
||||||
file://lib/lib-demo.c \
|
file://lib/lib-demo.c \
|
||||||
file://lib/lib-demo.h"
|
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"
|
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}"
|
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
|
inherit cmake systemd
|
||||||
|
|
||||||
#Passing any needed configure options to CMake
|
# Passing any needed configure options to CMake
|
||||||
EXTRA_OECMAKE = ""
|
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() {
|
do_install:append() {
|
||||||
install -d ${D}/${systemd_unitdir}/system
|
install -d ${D}/${systemd_unitdir}/system
|
||||||
install -m 0644 ${WORKDIR}/src/hello.service ${D}/${systemd_unitdir}/system
|
install -m 0644 ${WORKDIR}/src/hello.service ${D}/${systemd_unitdir}/system
|
||||||
|
|
|
||||||
|
|
@ -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)
|
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)
|
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)
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
|
|
||||||
#Adding subdirectories that contain CMakeLists.txt
|
# Adding subdirectories that contain CMakeLists.txt
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
# 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 the public header property to the one with the actual API.
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER lib-demo.h)
|
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)
|
install (TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
add_executable(helloworld helloworld.c)
|
||||||
|
|
||||||
#Install binary
|
# Install binary
|
||||||
install(TARGETS helloworld RUNTIME DESTINATION bin)
|
install(TARGETS helloworld RUNTIME DESTINATION bin)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#Systemd service file
|
# Systemd service file
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=GNU Hello World startup script for KOAN training course
|
Description=GNU Hello World startup script for KOAN training course
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue