From 76dc6715734295ff1866bfc32872ff2278258fc8 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Thu, 22 Feb 2024 14:50:05 -0300 Subject: [PATCH] Add option YAML_ENABLE_PIC=ON --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c486161dd..72fa5427b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ option(YAML_CPP_INSTALL "Enable generation of yaml-cpp install targets" ${YAML_C option(YAML_CPP_FORMAT_SOURCE "Format source" ${YAML_CPP_MAIN_PROJECT}) option(YAML_CPP_DISABLE_UNINSTALL "Disable uninstallation of yaml-cpp" OFF) option(YAML_USE_SYSTEM_GTEST "Use system googletest if found" OFF) +option(YAML_ENABLE_PIC "Use Position-Independent Code " ON) cmake_dependent_option(YAML_CPP_BUILD_TESTS "Enable yaml-cpp tests" OFF @@ -91,9 +92,7 @@ set_property(TARGET yaml-cpp CXX_STANDARD_REQUIRED ON) if (NOT YAML_BUILD_SHARED_LIBS) - if (NOT PSP AND NOT PS3) - set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() + set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ${YAML_ENABLE_PIC}) endif() target_include_directories(yaml-cpp