From cbadcad8583475095a8430ba368d9dd1f30230a9 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Thu, 20 Dec 2007 15:31:21 +0000 Subject: [PATCH] Fixed cmake 2.4 failing if data/levels contains a dir without levels SVN-Revision: 5213 --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b49edf8e6..9f65048be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,12 +32,6 @@ # -# -# Open Issues: -# - none? -# - - ## Project name to use as command prefix PROJECT(SUPERTUX) @@ -242,6 +236,8 @@ IF(GENERATE_MESSAGESPOT) FOREACH(SUPERTUX_LEVEL_DIR ${SUPERTUX_LEVEL_DIRS}) FILE(GLOB SUPERTUX_LEVELS RELATIVE ${SUPERTUX_SOURCE_DIR} ${SUPERTUX_LEVEL_DIR}/*.stl ${SUPERTUX_LEVEL_DIR}/*.stwm ${SUPERTUX_LEVEL_DIR}/*.txt) + ## Do not add target if SUPERTUX_LEVELS is empty. This is needed for cmake <=2.4 + IF(SUPERTUX_LEVELS) SET(MESSAGES_POT_FILE ${SUPERTUX_SOURCE_DIR}/${SUPERTUX_LEVEL_DIR}/messages.pot) ADD_CUSTOM_COMMAND( OUTPUT ${MESSAGES_POT_FILE} @@ -252,6 +248,7 @@ IF(GENERATE_MESSAGESPOT) COMMENT "Generating POT file ${MESSAGES_POT_FILE}" ) LIST(APPEND MESSAGES_POT_FILES ${MESSAGES_POT_FILE}) + ENDIF(SUPERTUX_LEVELS) ENDFOREACH(SUPERTUX_LEVEL_DIR) -- 2.11.0