Skip to content

Commit 76dc671

Browse files
humbertodiasjbeder
authored andcommitted
Add option YAML_ENABLE_PIC=ON
1 parent 5c1bbbd commit 76dc671

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ option(YAML_CPP_INSTALL "Enable generation of yaml-cpp install targets" ${YAML_C
2828
option(YAML_CPP_FORMAT_SOURCE "Format source" ${YAML_CPP_MAIN_PROJECT})
2929
option(YAML_CPP_DISABLE_UNINSTALL "Disable uninstallation of yaml-cpp" OFF)
3030
option(YAML_USE_SYSTEM_GTEST "Use system googletest if found" OFF)
31+
option(YAML_ENABLE_PIC "Use Position-Independent Code " ON)
3132

3233
cmake_dependent_option(YAML_CPP_BUILD_TESTS
3334
"Enable yaml-cpp tests" OFF
@@ -91,9 +92,7 @@ set_property(TARGET yaml-cpp
9192
CXX_STANDARD_REQUIRED ON)
9293

9394
if (NOT YAML_BUILD_SHARED_LIBS)
94-
if (NOT PSP AND NOT PS3)
95-
set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ON)
96-
endif()
95+
set_property(TARGET yaml-cpp PROPERTY POSITION_INDEPENDENT_CODE ${YAML_ENABLE_PIC})
9796
endif()
9897

9998
target_include_directories(yaml-cpp

0 commit comments

Comments
 (0)