# HG changeset patch
# User sheepluva
# Date 1315832184 -7200
# Node ID 7d52d7174619908f370a6aac9d9434f08d6dcd79
# Parent  b3e23cb69ab490aeaaaad6e7b7d07c54c1b1d78d
fix out-of-dir builds

diff -r b3e23cb69ab4 -r 7d52d7174619 hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Mon Sep 12 07:38:16 2011 +0200
+++ b/hedgewars/CMakeLists.txt	Mon Sep 12 14:56:24 2011 +0200
@@ -183,7 +183,7 @@
 
 
 add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}")
-add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" WORKING_DIRECTORY "${hedgewars_SOURCE_DIR}/hedgewars")
+add_custom_target(ENGINECLEAN COMMAND ${CMAKE_BUILD_TOOL} "clean" "${PROJECT_BINARY_DIR}" "${hedgewars_SOURCE_DIR}/hedgewars")
 add_dependencies(${engine_output_name} ENGINECLEAN)
 
 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})