diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bb395fc5..5c41556b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,13 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-include_directories(
- ../tools/gtest
- ../tools/gtest/include)
-
-add_library(gtest STATIC ../tools/gtest/src/gtest-all.cc)
-
add_subdirectory(lib)
add_subdirectory(cmd)
-add_subdirectory(unittests)
-add_subdirectory(integtests)
+add_subdirectory(test)
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
new file mode 100644
index 00000000..82b8922e
--- /dev/null
+++ b/src/test/CMakeLists.txt
@@ -0,0 +1,23 @@
+# synergy -- mouse and keyboard sharing utility
+# Copyright (C) 2011 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
+#
+# This package is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# found in the file COPYING that should have accompanied this file.
+#
+# This package is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+include_directories(
+ ../../tools/gtest
+ ../../tools/gtest/include)
+
+add_library(gtest STATIC ../../tools/gtest/src/gtest-all.cc)
+
+add_subdirectory(integtests)
+add_subdirectory(unittests)
diff --git a/src/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
similarity index 100%
rename from src/integtests/CMakeLists.txt
rename to src/test/integtests/CMakeLists.txt
diff --git a/src/integtests/Main.cpp b/src/test/integtests/Main.cpp
similarity index 100%
rename from src/integtests/Main.cpp
rename to src/test/integtests/Main.cpp
diff --git a/src/integtests/platform/CMSWindowsClipboardTests.cpp b/src/test/integtests/platform/CMSWindowsClipboardTests.cpp
similarity index 100%
rename from src/integtests/platform/CMSWindowsClipboardTests.cpp
rename to src/test/integtests/platform/CMSWindowsClipboardTests.cpp
diff --git a/src/integtests/platform/COSXClipboardTests.cpp b/src/test/integtests/platform/COSXClipboardTests.cpp
similarity index 100%
rename from src/integtests/platform/COSXClipboardTests.cpp
rename to src/test/integtests/platform/COSXClipboardTests.cpp
diff --git a/src/integtests/platform/CXWindowsClipboardTests.cpp b/src/test/integtests/platform/CXWindowsClipboardTests.cpp
similarity index 100%
rename from src/integtests/platform/CXWindowsClipboardTests.cpp
rename to src/test/integtests/platform/CXWindowsClipboardTests.cpp
diff --git a/src/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
similarity index 100%
rename from src/unittests/CMakeLists.txt
rename to src/test/unittests/CMakeLists.txt
diff --git a/src/unittests/synergy/CClipboardTests.cpp b/src/test/unittests/synergy/CClipboardTests.cpp
similarity index 100%
rename from src/unittests/synergy/CClipboardTests.cpp
rename to src/test/unittests/synergy/CClipboardTests.cpp