project(yail LANGUAGES CXX) cmake_minimum_required(VERSION 3.28) set(BOOST_INCLUDE_LIBRARIES "pfr;asio") set(UTEMPL_URL "https://helicopter.myftp.org/git/sha512sum/utempl" CACHE STRING "utempl repository URL") file( DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.0/CPM.cmake ${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake EXPECTED_HASH SHA256=7b354f3a5976c4626c876850c93944e52c83ec59a159ae5de5be7983f0e17a2a ) include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake) CPMAddPackage( NAME Boost VERSION 1.85.0 URL "https://github.com/boostorg/boost/releases/download/boost-1.85.0/boost-1.85.0-cmake.tar.xz" EXCLUDE_FROM_ALL ON OPTIONS "BOOST_SKIP_INSTALL_RULES OFF" ) CPMAddPackage( NAME utempl URL "${UTEMPL_URL}/archive/refs/heads/main.zip" EXCLUDE_FROM_ALL ON OPTIONS "ENABLE_TESTS OFF" "ENABLE_EXAMPLES OFF" ) add_library(yail INTERFACE) target_link_libraries(yail INTERFACE utempl::utempl Boost::asio) target_include_directories(yail INTERFACE $ $) add_executable(main main.cpp) target_link_libraries(main yail)