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)
add_library(game ${ERESSEA_SRC})
add_library(version OBJECT ${VERSION_SRC})
add_library(game ${ERESSEA_SRC}
$<TARGET_OBJECTS:version>
)
add_executable(eressea ${SERVER_SRC})
target_link_libraries(eressea
game

View File

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