@ -14,9 +14,11 @@ if( NOT TDE_RELEASE_ENTITIES )
set ( ENTITIES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/customization/entities/general.entities" )
if ( NOT EXISTS ${ TDEVERSION_FILE } )
file ( RELATIVE_PATH TDEVERSION_FILE ${ CMAKE_SOURCE_DIR } ${ TDEVERSION_FILE } )
tde_message_fatal ( "${TDEVERSION_FILE} not found! Check your sources." )
endif ( )
if ( NOT EXISTS ${ ENTITIES_FILE } )
file ( RELATIVE_PATH ENTITIES_FILE ${ CMAKE_SOURCE_DIR } ${ ENTITIES_FILE } )
tde_message_fatal ( "${ENTITIES_FILE} not found! Check your sources." )
endif ( )
@ -65,34 +67,12 @@ if( NOT TDE_RELEASE_ENTITIES )
T D E _ R E L E A S E _ D A T E " $ { T D E _ R E L E A S E _ D A T E } " )
# u p d a t e e n t i t i e s
file ( RELATIVE_PATH ENTITIES_FILE ${ CMAKE_SOURCE_DIR } ${ ENTITIES_FILE } )
message ( STATUS " Updating ${ ENTITIES_FILE }
T D E R e l e a s e V e r s i o n : $ { T D E _ V E R S I O N _ S T R I N G }
T D E R e l e a s e D a t e : $ { T D E _ R E L E A S E _ D A T E }
T D E R e l e a s e C o p y r i g h t : $ { T D E _ R E L E A S E _ C O P Y R I G H T } "
)
file ( READ ${ ENTITIES_FILE } ENTITIES_DATA )
if ( "${ENTITIES_DATA}" MATCHES "ENTITY tde-release-version" )
string ( REGEX REPLACE "(ENTITY tde-release-version) \" [^\ "]*\" "
" \ \ 1 \ " $ { T D E _ V E R S I O N _ S T R I N G } \ " " E N T I T I E S _ D A T A " $ { E N T I T I E S _ D A T A } " )
else ( )
set ( ENTITIES_DATA
" $ { E N T I T I E S _ D A T A } < ! E N T I T Y t d e - r e l e a s e - v e r s i o n \ " $ { T D E _ V E R S I O N _ S T R I N G } \ " > \ n " )
endif ( )
if ( "${ENTITIES_DATA}" MATCHES "ENTITY tde-release-date" )
string ( REGEX REPLACE "(ENTITY tde-release-date) \" [^\ "]*\" "
" \ \ 1 \ " $ { T D E _ R E L E A S E _ D A T E } \ " " E N T I T I E S _ D A T A " $ { E N T I T I E S _ D A T A } " )
else ( )
set ( ENTITIES_DATA
" $ { E N T I T I E S _ D A T A } < ! E N T I T Y t d e - r e l e a s e - d a t e \ " $ { T D E _ R E L E A S E _ D A T E } \ " > \ n " )
endif ( )
if ( "${ENTITIES_DATA}" MATCHES "ENTITY tde-copyright-date" )
string ( REGEX REPLACE "(ENTITY tde-copyright-date) \" [^\ "]*\" "
" \ \ 1 \ " $ { T D E _ R E L E A S E _ C O P Y R I G H T } \ " " E N T I T I E S _ D A T A " $ { E N T I T I E S _ D A T A } " )
else ( )
set ( ENTITIES_DATA
" $ { E N T I T I E S _ D A T A } < ! E N T I T Y t d e - c o p y r i g h t - d a t e \ " $ { T D E _ R E L E A S E _ C O P Y R I G H T } \ " > \ n " )
endif ( )
file ( WRITE ${ ENTITIES_FILE } "${ENTITIES_DATA}" )
set ( TDE_RELEASE_ENTITIES 1 CACHE INTERNAL "" )
endif ( )