From 6629d317333a288c10b41083e591ef119f9eb8b4 Mon Sep 17 00:00:00 2001 From: Stanislav Angelovic Date: Thu, 23 May 2019 22:04:51 +0200 Subject: [PATCH] Update CMake usage example in tutorial --- docs/using-sdbus-c++.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/using-sdbus-c++.md b/docs/using-sdbus-c++.md index 0193471..ae620ac 100644 --- a/docs/using-sdbus-c++.md +++ b/docs/using-sdbus-c++.md @@ -29,10 +29,15 @@ sdbus-c++ does not cover the entire sd-bus API, but provides tools for implement Integrating sdbus-c++ into your project --------------------------------------- -The library build system is based on CMake. The library provides a config file, so integrating it into your CMake project is rather straight-forward: +The library build system is based on CMake. The library provides a config and an export file, so integrating it into your CMake project is sooo simple: -```bash +```cmake +# First, find sdbus-c++ find_package(sdbus-c++ REQUIRED) + +# Use the sdbus-c++ target in SDBusCpp namespace +add_executable(exe exe.cpp) +target_link_libraries(exe PRIVATE SDBusCpp::sdbus-c++) ``` The library also supports `pkg-config`, so it easily be integrated into e.g. an Autotools project: