mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
* add DEPENDENCY_ADDED property * update examples * Update README.md * Update README.md * Update CPM.cmake * Update README.md
26 lines
692 B
CMake
26 lines
692 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 depricated CMake syntax
|
|
VERSION 0.6.3
|
|
# 0.6.3 is not released yet, so use the most recent commit
|
|
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)
|
|
|