reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
995 stars 238 forks source link

CMake: add find_package support #293

Closed 7FM closed 2 months ago

7FM commented 6 months ago

I am not that familiar with CMake but I managed to add rudimental support to include tgbot-cpp into another CMake project with find_package(TgBot REQUIRED)

However, with the current changes including the library fails with the following message:

  The link interface of target "TgBot::TgBot" contains:

    Boost::system

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

UNLESS one adds find_package(Boost 1.65.1 COMPONENTS system REQUIRED) right before the find_package(TgBot REQUIRED).