--- ./lib/CMakeLists.txt.orig	2013-12-15 12:43:00.000000000 +0000
+++ ./lib/CMakeLists.txt	2014-02-11 21:08:46.000000000 +0000
@@ -64,7 +64,12 @@
 if(NOT DEFINED LIB_INSTALL_DIR)
     set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
 endif()
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+    install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
+else ()
+    install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+endif ()
 
 # Link all
 set (CFLAGS ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER})
