yaml-cpp/util/CMakeLists.txt
Isabella Muerte 5e9cb0128d Refactor CMake to use more modern paradigms (#741)
Remove 2.6-isms
Remove 2.8-isms
Bump CMake minimum version to 3.4

Disable some options when used as a subdirectory

Use `CONFIGURE_DEPENDS` with `file(GLOB)` when possible

Backport CMake 3.15's MSVC_RUNTIME_LIBRARY setting.
Set all compile options as generator expressions.
Set all find-package files to be installed to the correct file.

Remove `export(PACKAGE)`, as this has been deprecated.
Remove fat binary support
Remove manual setting of iPhone settings. These should be set by parent
projects.
Remove use of ExternalProject for a local use
Conditionally remove format target unless clang-format is found
2019-09-27 09:59:53 -05:00

33 lines
948 B
CMake

add_executable(yaml-cpp-sandbox sandbox.cpp)
add_executable(yaml-cpp-parse parse.cpp)
add_executable(yaml-cpp-read read.cpp)
target_link_libraries(yaml-cpp-sandbox PRIVATE yaml-cpp)
target_link_libraries(yaml-cpp-parse PRIVATE yaml-cpp)
target_link_libraries(yaml-cpp-read PRIVATE yaml-cpp)
set_property(TARGET yaml-cpp-sandbox PROPERTY OUTPUT_NAME sandbox)
set_property(TARGET yaml-cpp-parse PROPERTY OUTPUT_NAME parse)
set_property(TARGET yaml-cpp-read PROPERTY OUTPUT_NAME read)
set_target_properties(yaml-cpp-sandbox
PROPERTIES
CXX_STANDARD_REQUIRED ON
OUTPUT_NAME sandbox)
set_target_properties(yaml-cpp-parse
PROPERTIES
CXX_STANDARD_REQUIRED ON
OUTPUT_NAME parse)
set_target_properties(yaml-cpp-read
PROPERTIES
CXX_STANDARD_REQUIRED ON
OUTPUT_NAME read)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set_target_properties(yaml-cpp-sandbox yaml-cpp-parse yaml-cpp-read
PROPERTIES
CXX_STANDARD 11)
endif()