Qt requires position independent code on Linux
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9861602..9aff9cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,7 @@
 option(LOG4CXX_QT_SUPPORT "Qt support/integration" OFF)
 if(LOG4CXX_QT_SUPPORT)
     find_package(Qt5 COMPONENTS Core REQUIRED)
+    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 endif(LOG4CXX_QT_SUPPORT)
 
 option(LOG4CXX_ENABLE_ODBC "Support logging via ODBC" OFF)