From: Tim Goya Date: Tue, 9 Oct 2007 14:10:20 +0000 (+0000) Subject: generate miniswig parser and lexer in binary dir X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0078f351e60d0ac009e26c0974f01221be4f5a3e;p=supertux.git generate miniswig parser and lexer in binary dir SVN-Revision: 5165 --- diff --git a/tools/miniswig/CMakeLists.txt b/tools/miniswig/CMakeLists.txt index de255c24d..040e8425a 100644 --- a/tools/miniswig/CMakeLists.txt +++ b/tools/miniswig/CMakeLists.txt @@ -32,9 +32,9 @@ IF (NOT BISON_EXECUTABLE) MESSAGE(FATAL_ERROR "bison not found - aborting") ENDIF (NOT BISON_EXECUTABLE) ADD_CUSTOM_COMMAND( - OUTPUT ${MINISWIG_SOURCE_DIR}/parser.cpp ${MINISWIG_SOURCE_DIR}/parser.hpp + OUTPUT ${MINISWIG_BINARY_DIR}/parser.cpp ${MINISWIG_BINARY_DIR}/parser.hpp COMMAND ${BISON_EXECUTABLE} - ARGS -d -o ${MINISWIG_SOURCE_DIR}/parser.cpp ${MINISWIG_SOURCE_DIR}/parser.yy + ARGS -d -o ${MINISWIG_BINARY_DIR}/parser.cpp ${MINISWIG_SOURCE_DIR}/parser.yy DEPENDS parser.yy ) @@ -45,16 +45,20 @@ IF (NOT FLEX_EXECUTABLE) MESSAGE(FATAL_ERROR "flex not found - aborting") ENDIF (NOT FLEX_EXECUTABLE) ADD_CUSTOM_COMMAND( - OUTPUT ${MINISWIG_SOURCE_DIR}/lexer.cpp + OUTPUT ${MINISWIG_BINARY_DIR}/lexer.cpp COMMAND ${FLEX_EXECUTABLE} - ARGS -o ${MINISWIG_SOURCE_DIR}/lexer.cpp ${MINISWIG_SOURCE_DIR}/lexer.ll - DEPENDS lexer.ll ${MINISWIG_SOURCE_DIR}/parser.hpp + ARGS -o ${MINISWIG_BINARY_DIR}/lexer.cpp ${MINISWIG_SOURCE_DIR}/lexer.ll + DEPENDS lexer.ll ${MINISWIG_BINARY_DIR}/parser.hpp ) +## Include paths to make generated files work + +INCLUDE_DIRECTORIES (${MINISWIG_SOURCE_DIR}) + ## build list of source files -FILE(GLOB MINISWIG_SOURCES RELATIVE ${MINISWIG_SOURCE_DIR} *.cpp) +FILE(GLOB MINISWIG_SOURCES RELATIVE ${MINISWIG_SOURCE_DIR} create_docu.cpp create_wrapper.cpp main.cpp tree.cpp xmlwriter.cpp) ## Add target for miniswig binary -ADD_EXECUTABLE(miniswig ${MINISWIG_SOURCES} ${MINISWIG_SOURCE_DIR}/parser.cpp ${MINISWIG_SOURCE_DIR}/lexer.cpp) +ADD_EXECUTABLE(miniswig ${MINISWIG_SOURCES} ${MINISWIG_BINARY_DIR}/parser.cpp ${MINISWIG_BINARY_DIR}/lexer.cpp)