add_library & and_executable omitted sources added back for cmake 3.10.x and below compatibility

This commit is contained in:
Fatih Yazıcı 2019-10-04 00:14:50 +03:00
parent 848091124d
commit ba4c216444
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,9 @@ set(msvc-rt-mt-dll $<STREQUAL:${msvc-rt},MultiThreadedDLL>)
set(backport-msvc-runtime $<VERSION_LESS:${CMAKE_VERSION},3.15>)
add_library(yaml-cpp ${yaml-cpp-type})
add_library(yaml-cpp ${yaml-cpp-type}
$<$<BOOL:${YAML_CPP_BUILD_CONTRIB}>:${yaml-cpp-contrib-sources}>
${yaml-cpp-sources})
add_library(yaml::yaml ALIAS yaml-cpp)
set_property(TARGET yaml-cpp

View File

@ -20,7 +20,9 @@ endif()
file(GLOB test-new-api-sources ${test-new-api-pattern})
file(GLOB test-sources ${test-source-pattern})
add_executable(yaml-cpp-tests)
add_executable(yaml-cpp-tests
${test-new-api-sources}
${test-sources})
target_sources(yaml-cpp-tests
PRIVATE
${test-new-api-sources}