Patch-Source: https://github.com/jbeder/yaml-cpp/pull/1032 From 52e9b62da3d0c040c31e9fff41c3eb2be6f9d551 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Fri, 10 Sep 2021 20:12:51 +0100 Subject: [PATCH] set -fPIC --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b230b9e6..24a4b709 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,9 @@ set(backport-msvc-runtime $) add_library(yaml-cpp ${yaml-cpp-type} "") add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp) +set_property(TARGET yaml-cpp + PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET yaml-cpp PROPERTY MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY})