Files
CPM.cmake/examples/yaml/CMakeLists.txt
Lars Melchior b1ef60175a New examples (#47)
* simplify yaml build

* add simple_match
2019-05-17 18:07:31 +02:00

26 lines
655 B
CMake

cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
# ---- Dependencies ----
include(../../cmake/CPM.cmake)
CPMAddPackage(
NAME yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
# 0.6.2 uses old CMake syntax
VERSION 0.6.3
# 0.6.3 not released yet
GIT_TAG 012269756149ae99745b6dafefd415843d7420bb
OPTIONS
"YAML_CPP_BUILD_TESTS Off"
"YAML_CPP_BUILD_CONTRIB Off"
"YAML_CPP_BUILD_TOOLS Off"
)
# ---- Executable ----
add_executable(CPMYamlExample "main.cpp")
set_target_properties(CPMYamlExample PROPERTIES CXX_STANDARD 17)
target_link_libraries(CPMYamlExample yaml-cpp)