mirror of
https://github.com/UltraCoderRU/telebotxx.git
synced 2026-01-28 04:05:13 +00:00
Update README with integration instructions
This commit is contained in:
parent
b1f0b94ba3
commit
34424d8a45
1 changed files with 28 additions and 3 deletions
31
README.md
31
README.md
|
|
@ -8,15 +8,40 @@ In development, so you are welcome to contribute.
|
||||||
* C++17-compatible compiler
|
* C++17-compatible compiler
|
||||||
* CMake 3.15 or newer
|
* CMake 3.15 or newer
|
||||||
|
|
||||||
## Building
|
## Integration
|
||||||
*You can set available options in CMakeLists.txt before running configure script.*
|
|
||||||
|
### CMake (recommended)
|
||||||
|
|
||||||
|
Assuming you have your third-party dependencies in `external` directory relative to project's root.
|
||||||
|
You can add telebotxx to your Git repository as submodule.
|
||||||
```bash
|
```bash
|
||||||
|
git submodule add https://github.com/UltraCoderRU/telebotxx.git external/telebotxx
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
```
|
||||||
|
|
||||||
|
Then integrate telebotxx into your CMake project as subdirectory and link with `telebotxx` target.
|
||||||
|
```cmake
|
||||||
|
# You can configure available options by setting cached variables before add_subdirectory()
|
||||||
|
# set(TELEBOTXX_USE_LIBCXX ON CACHE INTERNAL "")
|
||||||
|
add_subdirectory(external/telebotxx)
|
||||||
|
|
||||||
|
add_executable(myapp ...)
|
||||||
|
target_link_libraries(myapp telebotxx)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Separate building
|
||||||
|
|
||||||
|
Of course, you can build and install library separately.
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/UltraCoderRU/telebotxx.git
|
||||||
|
cd telebotxx
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
sudo cmake --build . --target install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Sending text message
|
### Sending text message
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue