--- osquery/tables/CMakeLists.txt.orig	2015-05-05 00:16:41 UTC
+++ osquery/tables/CMakeLists.txt
@@ -33,7 +33,7 @@ else()
   file(GLOB OSQUERY_LINUX_TABLES_TESTS "*/linux/tests/*.cpp")
   ADD_OSQUERY_TABLE_TEST(${OSQUERY_LINUX_TABLES_TESTS})
 
-  if(CENTOS)
+  if(CENTOS OR RHEL)
     # CentOS specific tables
     file(GLOB OSQUERY_REDHAT_TABLES "*/centos/*.cpp")
     ADD_OSQUERY_LIBRARY(FALSE osquery_tables_redhat
@@ -59,7 +59,7 @@ else()
   ADD_OSQUERY_LINK(FALSE "uuid")
 endif()
 
-file(GLOB OSQUERY_CROSS_TABLES "[!u]*/*.cpp")
+file(GLOB OSQUERY_CROSS_TABLES "[!ue]*/*.cpp")
 ADD_OSQUERY_LIBRARY(FALSE osquery_tables
   ${OSQUERY_CROSS_TABLES}
 )
@@ -72,10 +72,12 @@ ADD_OSQUERY_LIBRARY(TRUE osquery_tables_
   ${OSQUERY_UTILITY_TABLES}
 )
 
-file(GLOB OSQUERY_UTILS "utils/*.cpp")
-ADD_OSQUERY_LIBRARY(FALSE osquery_utils
-  ${OSQUERY_UTILS}
-)
+if(NOT FREEBSD)
+  file(GLOB OSQUERY_UTILS "utils/*.cpp")
+  ADD_OSQUERY_LIBRARY(FALSE osquery_utils
+    ${OSQUERY_UTILS}
+  )
 
-file(GLOB OSQUERY_UTILS_TESTS "utils/tests/*.cpp")
-ADD_OSQUERY_TEST(FALSE ${OSQUERY_UTILS_TESTS})
+  file(GLOB OSQUERY_UTILS_TESTS "utils/tests/*.cpp")
+  ADD_OSQUERY_TEST(FALSE ${OSQUERY_UTILS_TESTS})
+endif()
