summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal <770876997@qq.com>2018-11-14 10:47:41 +0800
committerhannibal <770876997@qq.com>2018-11-14 10:47:41 +0800
commitef7800aff32d8558f155ee26adfdb71c8e35f93a (patch)
tree918fa73dfc801425d80d83bb1bcbe59923dfbea6
parentb35438dd77e4c2391391d7777c0a0b4cfd6e46f5 (diff)
add_subdirectory(tgbot-cpp)
-rw-r--r--CMakeLists.txt1
-rw-r--r--README.md12
2 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6d5c2e..c4f7195 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ set(LIB_LIST
# building project
add_library(${PROJECT_NAME} ${SRC_LIST})
+target_include_directories(${PROJECT_NAME} PUBLIC include)
target_link_libraries(${PROJECT_NAME} ${LIB_LIST})
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)
diff --git a/README.md b/README.md
index fc7e330..c2345a8 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ int main() {
All other samples are located [here](samples).
-## Library compilation
+## Dependencies
Firstly you need to install some dependencies such as Boost and build tools such as CMake. On Debian-based distibutives you can do it with these commands:
```sh
@@ -66,14 +66,20 @@ sudo apt-get install g++ make binutils cmake libssl-dev libboost-system-dev
```
If you want to use curl-based http client `CurlHttpClient`, you also need to install `libcurl4-openssl-dev` package.
-To compile the library execute this commands:
+## Library installation
+
+If you want to install the library system-wide:
+
```sh
-cd /path/where/you/have/cloned/the/library/repository
+git clone https://github.com/reo7sp/tgbot-cpp
+cd tgbot-cpp
cmake .
make -j4
sudo make install
```
+Or you can treat this repository as a submodule of your project, for example, see [echobot-submodule](samples/echobot/CMakeLists.txt)
+
## Specific library installation notes
### Docker