From ba4c216444ecc74b0c1022a6231aac2c999899b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Yaz=C4=B1c=C4=B1?= Date: Fri, 4 Oct 2019 00:14:50 +0300 Subject: [PATCH] add_library & and_executable omitted sources added back for cmake 3.10.x and below compatibility --- CMakeLists.txt | 4 +++- test/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2236dd1..0414ad0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,9 @@ set(msvc-rt-mt-dll $) set(backport-msvc-runtime $) -add_library(yaml-cpp ${yaml-cpp-type}) +add_library(yaml-cpp ${yaml-cpp-type} + $<$:${yaml-cpp-contrib-sources}> + ${yaml-cpp-sources}) add_library(yaml::yaml ALIAS yaml-cpp) set_property(TARGET yaml-cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3301584..a577c48 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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}