2019-07-01 20:30:21 +02:00
|
|
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
|
|
2019-10-10 20:13:10 +02:00
|
|
|
project(CPMExampleBoost)
|
|
|
|
|
|
2019-07-01 20:30:21 +02:00
|
|
|
# ---- Create binary ----
|
|
|
|
|
|
|
|
|
|
add_executable(CPMExampleBoost main.cpp)
|
2021-02-07 17:08:04 +01:00
|
|
|
target_compile_features(CPMExampleBoost PRIVATE cxx_std_17)
|
2019-07-01 20:30:21 +02:00
|
|
|
|
|
|
|
|
# ---- Dependencies ----
|
|
|
|
|
|
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
|
|
2021-12-05 16:08:47 +01:00
|
|
|
CPMAddPackage(
|
|
|
|
|
NAME Boost
|
2024-02-02 12:25:34 -06:00
|
|
|
VERSION 1.84.0
|
|
|
|
|
URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz
|
|
|
|
|
URL_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e
|
|
|
|
|
OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES container\\\;asio" # Note the escapes!
|
2021-12-05 16:08:47 +01:00
|
|
|
)
|
|
|
|
|
|
2024-02-02 12:25:34 -06:00
|
|
|
target_link_libraries(CPMExampleBoost PRIVATE Boost::asio Boost::container)
|