diff --git a/cmake/modules/DunePybindxiMacros.cmake b/cmake/modules/DunePybindxiMacros.cmake
index f50127929ef902ba0c1a524324ba80582a3cc54a..e916083574ae345ccababea3da4e33641f888828 100644
--- a/cmake/modules/DunePybindxiMacros.cmake
+++ b/cmake/modules/DunePybindxiMacros.cmake
@@ -40,3 +40,6 @@ endif()
 
 include(DunePybindxiUtils)
 include(DunePybindxiHelper)
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+