forked from github/server
smarter version.c build that avoids full rebuilds.
This commit is contained in:
parent
3f86014e9d
commit
dbde14fdff
|
@ -171,7 +171,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