Ensure source tree is clean after build

This commit is contained in:
Andrew Nelless 2017-01-07 16:47:29 +00:00
parent e3f3b7424c
commit e4db361d62
2 changed files with 3 additions and 14 deletions

View File

@ -39,19 +39,6 @@ endif()
# First, declare project (important for prerequisite checks). # First, declare project (important for prerequisite checks).
project(synergy C CXX) 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 some easy to type variables.
set(root_dir ${CMAKE_SOURCE_DIR}) set(root_dir ${CMAKE_SOURCE_DIR})
set(cmake_dir ${root_dir}/res) set(cmake_dir ${root_dir}/res)
@ -274,7 +261,7 @@ if (UNIX)
set(HAVE_SOCKLEN_T 1) set(HAVE_SOCKLEN_T 1)
# For config.h, save the results based on a template (config.h.in). # 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) add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)

View File

@ -14,6 +14,8 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(cmd) add_subdirectory(cmd)
add_subdirectory(gui) add_subdirectory(gui)