Files
CPM.cmake/examples/boost/CMakeLists.txt
Lars Melchior 8afc2af4f9 update more examples to use shorthand syntax (#223)
* 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
2021-02-25 09:53:28 +02:00

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)