From 2ee179c6b1ec9167966d4aa59fb65a377a193be0 Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Sun, 14 Sep 2025 08:01:42 +0300 Subject: [PATCH] - attempt to build PIC code by default --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35ea343..6441214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,8 @@ option(YAML_CPP_BUILD_TESTS "Enable yaml-cpp tests" option(YAML_CPP_INSTALL "Enable generation of yaml-cpp install targets" OFF) option(YAML_MSVC_SHARED_RT "MSVC: Build yaml-cpp with shared runtime libs (/MD)" OFF) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + set(yaml-cpp-type STATIC) set(yaml-cpp-label-postfix "static") if (YAML_BUILD_SHARED_LIBS)