CMakeLists.txt 643 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.26)
  2. project(CCB)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(Boost_USE_MULTITHREADED ON)
  5. find_package(Threads REQUIRED)
  6. find_package(OpenSSL REQUIRED)
  7. find_package(Boost COMPONENTS system REQUIRED)
  8. find_package(CURL)
  9. include_directories(/usr/local/include ${OPENSSL_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
  10. if (CURL_FOUND)
  11. include_directories(${CURL_INCLUDE_DIRS})
  12. add_definitions(-DHAVE_CURL)
  13. endif()
  14. file(GLOB SRC_ROOT src/*.cpp)
  15. add_executable(CCB ${SRC_ROOT})
  16. target_link_libraries(CCB zip stdc++fs /usr/local/lib/libTgBot.a ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES})