From 138895317c22df7a4db9f500f1723e6e14166c66 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Mon, 23 Jun 2008 12:26:25 +0200 Subject: [PATCH] cmake: make out-of-source build work with RO source dir again --- CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efadd216..c4da6241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,11 +26,12 @@ SET(AWE_DOC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) +FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/common) ADD_CUSTOM_COMMAND( COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gperf.sh ARGS ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.gperf - ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.h - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.h + ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.h + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.h DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.gperf ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gperf.sh COMMENT "Generating common/tokenize.h" @@ -38,8 +39,8 @@ ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND( COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gperf.sh ARGS ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.gperf - ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.c - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.c + ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.c + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.gperf ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gperf.sh COMMENT "Generating common/tokenize.c" @@ -102,8 +103,8 @@ SET(AWE_MAN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.5.txt) ADD_EXECUTABLE(${PROJECT_AWE_NAME} ${AWE_SRCS} - ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.c - ${CMAKE_CURRENT_SOURCE_DIR}/common/tokenize.h + ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.c + ${CMAKE_CURRENT_BINARY_DIR}/common/tokenize.h ) ADD_EXECUTABLE(${PROJECT_AWECLIENT_NAME} ${AWE_CLIENT_SRCS})