From: John Stamp <jstamp@users.sourceforge.net>
Subject: Install to multiarch libdir when CMAKE_SYSTEM_NAME != Linux
Date: Tue, 14 Aug 2012 22:27:05 -0700
Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684956#5
Last-Update: 2012-08-18
Bug: http://bugs.debian.org/684956

diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index 0302e4b..4dc2d68 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -78,7 +78,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
   # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
   # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
   # See http://wiki.debian.org/Multiarch
-  if(CMAKE_SYSTEM_NAME MATCHES "Linux"
+  if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
       AND NOT CMAKE_CROSSCOMPILING)
     if (EXISTS "/etc/debian_version") # is this a debian system ?
        if(CMAKE_LIBRARY_ARCHITECTURE)
