From e4db361d621fb122d8054572bbd0b40b4d4a84d6 Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Sat, 7 Jan 2017 16:47:29 +0000 Subject: [PATCH] Ensure source tree is clean after build --- CMakeLists.txt | 15 +-------------- src/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ddcfb0a..7b575a64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,19 +39,6 @@ endif() # First, declare project (important for prerequisite checks). 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) - -# for unix, put debug files in a separate bin "debug" dir. -# release bin files should stay in the root of the bin dir. -if (CMAKE_GENERATOR STREQUAL "Unix Makefiles") - if (CMAKE_BUILD_TYPE STREQUAL Debug) - set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug) - set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/debug) - endif() -endif() - # Set some easy to type variables. set(root_dir ${CMAKE_SOURCE_DIR}) set(cmake_dir ${root_dir}/res) @@ -274,7 +261,7 @@ if (UNIX) set(HAVE_SOCKLEN_T 1) # For config.h, save the results based on a template (config.h.in). - configure_file(res/config.h.in ${root_dir}/config.h) + configure_file(res/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/lib/config.h) add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 536e9575..820abce0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib) + add_subdirectory(lib) add_subdirectory(cmd) add_subdirectory(gui)