--- src/CMakeLists.txt.orig	2017-07-12 02:16:55 UTC
+++ src/CMakeLists.txt
@@ -149,7 +149,7 @@ if(APPLE)
         core/ScreenLockListenerMac.cpp
         )
 endif()
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
     set(keepassx_SOURCES ${keepassx_SOURCES}
         core/ScreenLockListenerDBus.h
         core/ScreenLockListenerDBus.cpp
