forked from github/server
smarter version.c build that avoids full rebuilds.
This commit is contained in:
parent
10916bb0a1
commit
47526dd36b
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue