smarter version.c build that avoids full rebuilds.

This commit is contained in:
Enno Rehling 2016-09-16 09:39:59 +02:00
parent 10916bb0a1
commit 47526dd36b
2 changed files with 6 additions and 2 deletions

View File

@ -173,7 +173,10 @@ set (SERVER_SRC ${SERVER_SRC}
) )
endif(CURSES_FOUND) endif(CURSES_FOUND)
add_library(game ${ERESSEA_SRC}) add_library(version OBJECT ${VERSION_SRC})
add_library(game ${ERESSEA_SRC}
$<TARGET_OBJECTS:version>
)
add_executable(eressea ${SERVER_SRC}) add_executable(eressea ${SERVER_SRC})
target_link_libraries(eressea target_link_libraries(eressea
game game

View File

@ -33,7 +33,6 @@ jsonconf.test.c
) )
SET(_FILES SET(_FILES
version.c
alliance.c alliance.c
ally.c ally.c
build.c build.c
@ -65,6 +64,8 @@ xmlreader.c
jsonconf.c jsonconf.c
) )
SET(VERSION_SRC ${PROJECT_NAME}/version.c PARENT_SCOPE)
FOREACH(_FILE ${_FILES}) FOREACH(_FILE ${_FILES})
LIST(APPEND _SOURCES ${PROJECT_NAME}/${_FILE}) LIST(APPEND _SOURCES ${PROJECT_NAME}/${_FILE})
ENDFOREACH(_FILE) ENDFOREACH(_FILE)