From c1df18ef4d962b65feed466e6ad34c2b67e1ef1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Tue, 5 Feb 2013 23:39:30 +0100 Subject: [PATCH] Fix generating file version-generated.h --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65d013a00..27955adea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -578,7 +578,14 @@ source_group(include\\guichan FILES ${stratagus_guichan_HDRS}) source_group(include\\spell FILES ${stratagus_spell_HDRS}) -set (stratagus_HDRS ${stratagus_generic_HDRS} ${stratagus_action_HDRS} ${stratagus_animation_HDRS} ${stratagus_guichan_HDRS} ${stratagus_spell_HDRS}) +set(stratagus_HDRS + ${stratagus_generic_HDRS} + ${stratagus_action_HDRS} + ${stratagus_animation_HDRS} + ${stratagus_guichan_HDRS} + ${stratagus_spell_HDRS} + ${CMAKE_CURRENT_BINARY_DIR}/version-generated.h +) # Additional platform checks @@ -980,12 +987,13 @@ add_executable(genversion ${genversion_SRCS}) ########### next target ############### -add_custom_target(version-generated.h ALL +add_custom_target(version ALL ${CMAKE_CURRENT_BINARY_DIR}/genversion ${CMAKE_CURRENT_BINARY_DIR}/version-generated.h "${STRATAGUS_VERSION}" DEPENDS genversion WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM ) +add_custom_command(OUTPUT version-generated.h DEPENDS version) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version-generated.h) ########### next target ###############