diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-22 18:02:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 18:02:02 +0100 |
commit | 63e67468b45edcc899de24a1940985bccf68f66a (patch) | |
tree | b8c8c5a7694ea7d98b1404d67a9d5b1492ec1071 /cmake.deps/cmake/BuildLibvterm.cmake | |
parent | 151b9fc52e3cd69b386eb2dc4e5a0d179667190b (diff) | |
download | rneovim-63e67468b45edcc899de24a1940985bccf68f66a.tar.gz rneovim-63e67468b45edcc899de24a1940985bccf68f66a.tar.bz2 rneovim-63e67468b45edcc899de24a1940985bccf68f66a.zip |
build: use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
It's simpler to let cmake figure out what flags to add to each platforms
to create position independent code rather than handling it ourselves.
Also remove code that sets POSITION_INDEPENDENT_CODE property on SHARED
and MODULE libraries, as it's already on by default.
Diffstat (limited to 'cmake.deps/cmake/BuildLibvterm.cmake')
-rw-r--r-- | cmake.deps/cmake/BuildLibvterm.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake index dffa545638..2e508a8dc8 100644 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ b/cmake.deps/cmake/BuildLibvterm.cmake @@ -9,10 +9,8 @@ if(WIN32) -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} - -DCMAKE_GENERATOR=${CMAKE_GENERATOR}) - if(NOT MSVC) - list(APPEND LIBVTERM_CONFIGURE_COMMAND "-DCMAKE_C_FLAGS:STRING=-fPIC") - endif() + -DCMAKE_GENERATOR=${CMAKE_GENERATOR} + -DCMAKE_POSITION_INDEPENDENT_CODE=ON) set(LIBVTERM_BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>) set(LIBVTERM_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config $<CONFIG>) else() |