@ -258,20 +258,19 @@ LIST(APPEND PROJECT_SOURCES ${GENERATED_HDRS})
FILE ( GLOB GENERATE_INPUT_SCRIPTS ${ dfapi_SOURCE_DIR } /xml/*.pm ${ dfapi_SOURCE_DIR } /xml/*.xslt )
FILE ( GLOB GENERATE_INPUT_XMLS ${ dfapi_SOURCE_DIR } /xml/df.*.xml )
STRING ( REPLACE ":" " " GEN_HDRS_STR "${GENERATED_HDRS}" )
ADD_CUSTOM_COMMAND (
O U T P U T $ { d f a p i _ S O U R C E _ D I R } / i n c l u d e / d f / c o d e g e n . o u t . x m l $ { G E N _ H D R S _ S T R }
O U T P U T $ { d f a p i _ S O U R C E _ D I R } / i n c l u d e / d f / c o d e g e n . o u t . x m l
C O M M A N D $ { P E R L _ E X E C U T A B L E } $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x m l / c o d e g e n . p l
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x m l
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / i n c l u d e / d f
M A I N _ D E P E N D E N C Y $ { d f a p i _ S O U R C E _ D I R } / x m l / c o d e g e n . p l
B Y P R O D U C T S $ { G E N E R A T E D _ H D R S }
C O M M E N T " G e n e r a t i n g c o d e g e n . o u t . x m l a n d d f / h e a d e r s "
D E P E N D S $ { G E N E R A T E _ I N P U T _ X M L S } $ { G E N E R A T E _ I N P U T _ S C R I P T S }
)
ADD_CUSTOM_TARGET ( generate_headers
D E P E N D S $ { d f a p i _ S O U R C E _ D I R } / i n c l u d e / d f / c o d e g e n . o u t . x m l $ { G E N _ H D R S _ S T R } )
D E P E N D S $ { d f a p i _ S O U R C E _ D I R } / i n c l u d e / d f / c o d e g e n . o u t . x m l )
IF ( REMOVE_SYMBOLS_FROM_DF_STUBS )
IF ( UNIX )
@ -325,24 +324,29 @@ ENDIF()
# a l w a y s r e - r u n g i t - d e s c r i b e i f c m a k e i s r e - run ( e.g. if build ID or version changes )
EXECUTE_PROCESS ( COMMAND ${ CMAKE_COMMAND } -E touch ${ CMAKE_CURRENT_SOURCE_DIR } /git-describe.cmake )
ADD_CUSTOM_COMMAND ( OUTPUT always_rebuild
C O M M A N D $ { C M A K E _ C O M M A N D } - E e c h o )
ADD_CUSTOM_COMMAND ( OUTPUT ${ CMAKE_CURRENT_SOURCE_DIR } /include/git-describe.h
C O M M A N D $ { C M A K E _ C O M M A N D }
- D d f h a c k _ S O U R C E _ D I R : S T R I N G = $ { d f h a c k _ S O U R C E _ D I R }
- D g i t _ d e s c r i b e _ h : S T R I N G = $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / i n c l u d e / g i t - d e s c r i b e . h
- D g i t _ d e s c r i b e _ t m p _ h : S T R I N G = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g i t - d e s c r i b e . h
- D G I T _ E X E C U T A B L E : S T R I N G = $ { G I T _ E X E C U T A B L E }
- D D F H A C K _ B U I L D _ I D : S T R I N G = $ { D F H A C K _ B U I L D _ I D }
- P $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g i t - d e s c r i b e . c m a k e
C O M M E N T " O b t a i n i n g g i t c o m m i t i n f o r m a t i o n "
D E P E N D S $ { G I T _ E X E C U T A B L E } a l w a y s _ r e b u i l d
V E R B A T I M
)
if ( EXISTS ${ CMAKE_SOURCE_DIR } /.git/index AND EXISTS ${ CMAKE_SOURCE_DIR } /.git/modules/library/xml/index )
ADD_CUSTOM_COMMAND ( OUTPUT ${ CMAKE_CURRENT_BINARY_DIR } /git-describe.h
C O M M A N D $ { C M A K E _ C O M M A N D }
- D d f h a c k _ S O U R C E _ D I R : S T R I N G = $ { d f h a c k _ S O U R C E _ D I R }
- D g i t _ d e s c r i b e _ t m p _ h : S T R I N G = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g i t - d e s c r i b e . h
- D G I T _ E X E C U T A B L E : S T R I N G = $ { G I T _ E X E C U T A B L E }
- D D F H A C K _ B U I L D _ I D : S T R I N G = $ { D F H A C K _ B U I L D _ I D }
- P $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g i t - d e s c r i b e . c m a k e
C O M M E N T " O b t a i n i n g g i t c o m m i t i n f o r m a t i o n "
D E P E N D S $ { C M A K E _ S O U R C E _ D I R } / . g i t / i n d e x
$ { C M A K E _ S O U R C E _ D I R } / . g i t / m o d u l e s / l i b r a r y / x m l / i n d e x
$ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g i t - d e s c r i b e . c m a k e
)
ADD_CUSTOM_COMMAND ( OUTPUT ${ CMAKE_CURRENT_SOURCE_DIR } /include/git-describe.h
D E P E N D S $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g i t - d e s c r i b e . h
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g i t - d e s c r i b e . h $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / i n c l u d e / g i t - d e s c r i b e . h
C O M M E N T " C o p y i n c l u d e / g i t - d e s c r i b e . h "
)
endif ( )
ADD_LIBRARY ( dfhack SHARED ${ PROJECT_SOURCES } )
ADD_DEPENDENCIES ( dfhack generate_proto_core )
ADD_DEPENDENCIES ( dfhack generate_headers )
ADD_LIBRARY ( dfhack-client SHARED RemoteClient.cpp ColorText.cpp MiscUtils.cpp Error.cpp ${ PROJECT_PROTO_SRCS } )
ADD_DEPENDENCIES ( dfhack-client dfhack )