mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 14:47:30 -05:00
* update more examples to use shorthand syntax * revert google-benchmark as tests require googletest to be installed * update comments * always quote single-arguments * undo accidental deletion
25 lines
583 B
CMake
25 lines
583 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
project(CPMExampleBoost)
|
|
|
|
# ---- Create binary ----
|
|
|
|
add_executable(CPMExampleBoost main.cpp)
|
|
target_compile_features(CPMExampleBoost PRIVATE cxx_std_17)
|
|
|
|
# ---- Dependencies ----
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
CPMFindPackage(
|
|
NAME Boost
|
|
GITHUB_REPOSITORY Orphis/boost-cmake
|
|
VERSION 1.67.0
|
|
# setting FIND_PACKAGE_ARGUMENTS allow usage with `CPM_USE_LOCAL_PACKAGES`
|
|
FIND_PACKAGE_ARGUMENTS "COMPONENTS system"
|
|
)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
target_link_libraries(CPMExampleBoost PRIVATE Boost::system Threads::Threads)
|