Fix boost in CMakeLists.txt

This commit is contained in:
sha512sum 2024-10-22 18:26:12 +00:00
parent fb0fcd2669
commit b184b05c28

View file

@ -1,6 +1,8 @@
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"
@ -15,6 +17,16 @@ file(
)
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"
@ -24,7 +36,7 @@ CPMAddPackage(
add_library(yail INTERFACE)
target_link_libraries(yail INTERFACE utempl::utempl)
target_link_libraries(yail INTERFACE utempl::utempl Boost::asio)
target_include_directories(yail INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>