diff --git a/CMakeLists.txt b/CMakeLists.txt index 05f5deb..40b70d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ project(tdlib-purple VERSION ${VERSION} LANGUAGES CXX) find_package(Td REQUIRED) math(EXPR TDLIB_VERSION_NUMBER "10000*${Td_VERSION_MAJOR} + 100*${Td_VERSION_MINOR} + ${Td_VERSION_PATCH}") if (${TDLIB_VERSION_NUMBER} LESS 10709) + # Error message must begin with "tdlib version" for a grep command from readme message(FATAL_ERROR "tdlib version 1.7.9 or newer is required") endif (${TDLIB_VERSION_NUMBER} LESS 10709) diff --git a/README.md b/README.md index 5efebba..76c1cd8 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,12 @@ The debug log contains a lot of private information such as names and phone numb ## Building -TDLib should be prebuilt and installed somewhere (requires C++14): +Compatible version of TDLib should be prebuilt and installed somewhere (requires C++14). Version requirement can be found in CMakeLists.txt: +``` +grep -o "tdlib version.*" CMakeLists.txt +``` + +TDLib can be built like this: ``` cd mkdir build @@ -51,7 +56,8 @@ cmake -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=/path/to/tdlib ``` -Also see [building](https://github.com/tdlib/td#building) for additional details on TDLib building. + +See also [building](https://github.com/tdlib/td#building). libtgvoip is required for voice calls.