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)