--- synergy-1.7.4-stable/CMakeLists.txt.~1~	2015-08-18 13:20:05.768602725 +0300
+++ synergy-1.7.4-stable/CMakeLists.txt	2015-08-18 13:20:26.418465842 +0300
@@ -40,8 +40,8 @@
 project(synergy C CXX)
 
 # put binaries in a different dir to make them easier to find.
-set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 
 # for unix, put debug files in a separate bin "debug" dir.
 # release bin files should stay in the root of the bin dir.
--- synergy-1.7.4-stable/src/lib/plugin/ns/CMakeLists.txt.~1~	2015-08-18 13:21:06.586011743 +0300
+++ synergy-1.7.4-stable/src/lib/plugin/ns/CMakeLists.txt	2015-08-18 13:22:10.180738479 +0300
@@ -106,22 +106,22 @@
 				TARGET ns
 				POST_BUILD
 				COMMAND mkdir -p
-					${CMAKE_SOURCE_DIR}/bin/debug/plugins
+					${CMAKE_BINARY_DIR}/bin/debug/plugins
 					&&
 					cp
-					${CMAKE_SOURCE_DIR}/lib/debug/libns.*
-					${CMAKE_SOURCE_DIR}/bin/debug/plugins/
+					${CMAKE_BINARY_DIR}/lib/debug/libns.*
+					${CMAKE_BINARY_DIR}/bin/debug/plugins/
 			)
 		else()
 			add_custom_command(
 				TARGET ns
 				POST_BUILD
 				COMMAND mkdir -p
-					${CMAKE_SOURCE_DIR}/bin/plugins
+					${CMAKE_BINARY_DIR}/bin/plugins
 					&&
 					cp
-					${CMAKE_SOURCE_DIR}/lib/libns.*
-					${CMAKE_SOURCE_DIR}/bin/plugins/
+					${CMAKE_BINARY_DIR}/lib/libns.*
+					${CMAKE_BINARY_DIR}/bin/plugins/
 			)
 		endif()
 	endif()