Import the package
You can import daemonize as usual with PID. In the root CMakelists.txt
file of your package, after the package declaration you have to write something like:
PID_Dependency(daemonize)
It will try to install last version of the package.
If you want a specific version (recommended), for instance the currently last released version:
PID_Dependency(daemonize VERSION 0.2)
Notice that PID will automatically install the last available patch version of the package when configuring the project with the option REQUIRED_PACKAGES_AUTOMATIC_DOWNLOAD
to ON (default value).
Components
daemonize
This is a shared library (set of header files and a shared binary object).
functions to help creating, stopping and monitoring background processes
include directive :
Not specified (dangerous). You can try including any or all of these headers:
#include <pid/daemonize.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND daemonize
PACKAGE daemonize)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT daemonize
PACKAGE daemonize)
daemon-launcher
This is an application (just a binary executable). Potentially designed to be called by an application or library.
an application to run any executable as a background process and kill them
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND daemon-launcher
PACKAGE daemonize)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT daemon-launcher
PACKAGE daemonize)
long-running-process
This is an application (just a binary executable). Potentially designed to be called by an application or library.
a dummy long running process for pid-tests/daemonize test purposes
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND long-running-process
PACKAGE daemonize)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT long-running-process
PACKAGE daemonize)