Do not set RPATH on FreeBSD either.
--- CMakeLists.txt.orig	2018-06-14 20:07:27 UTC
+++ CMakeLists.txt
@@ -224,7 +224,7 @@ endif(WIN32)
 ADD_DEFINITIONS("-DHAVE_CONFIG_H")
 
 # rpath handling: use rpath in installed binaries
-IF(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
+IF(NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Linux")
 	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
 	SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 ENDIF()
