summaryrefslogtreecommitdiffstats
path: root/kdoctools/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-06-16 15:05:00 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-06-16 15:05:00 +0200
commita94bf7ad14415944b4ed7f6bdded31101c716600 (patch)
tree4bb39c1ca591e49bac11452a6cc6d7eb4337391c /kdoctools/ConfigureChecks.cmake
parent98436f882d2146fe156c26e81bb87d409cfcf819 (diff)
downloadtdelibs-a94bf7ad14415944b4ed7f6bdded31101c716600.tar.gz
tdelibs-a94bf7ad14415944b4ed7f6bdded31101c716600.zip
Prepare the complete ksgmltools2 in the binary directory
instead of updating in the source. The configuration file mechanism is used to update items in general.entities instead of loading the file and replacing it with regular expressions. This relates to bug 3135. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kdoctools/ConfigureChecks.cmake')
-rw-r--r--kdoctools/ConfigureChecks.cmake26
1 files changed, 3 insertions, 23 deletions
diff --git a/kdoctools/ConfigureChecks.cmake b/kdoctools/ConfigureChecks.cmake
index c98843e23..876f91037 100644
--- a/kdoctools/ConfigureChecks.cmake
+++ b/kdoctools/ConfigureChecks.cmake
@@ -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 )
TDE_RELEASE_DATE "${TDE_RELEASE_DATE}" )
# update entities
+ file( RELATIVE_PATH ENTITIES_FILE ${CMAKE_SOURCE_DIR} ${ENTITIES_FILE} )
message( STATUS "Updating ${ENTITIES_FILE}
TDE Release Version: ${TDE_VERSION_STRING}
TDE Release Date: ${TDE_RELEASE_DATE}
TDE Release Copyright: ${TDE_RELEASE_COPYRIGHT}"
)
- file( READ ${ENTITIES_FILE} ENTITIES_DATA )
- if( "${ENTITIES_DATA}" MATCHES "ENTITY tde-release-version" )
- string( REGEX REPLACE "(ENTITY tde-release-version) \"[^\"]*\""
- "\\1 \"${TDE_VERSION_STRING}\"" ENTITIES_DATA "${ENTITIES_DATA}" )
- else( )
- set( ENTITIES_DATA
- "${ENTITIES_DATA}<!ENTITY tde-release-version \"${TDE_VERSION_STRING}\">\n" )
- endif( )
- if( "${ENTITIES_DATA}" MATCHES "ENTITY tde-release-date" )
- string( REGEX REPLACE "(ENTITY tde-release-date) \"[^\"]*\""
- "\\1 \"${TDE_RELEASE_DATE}\"" ENTITIES_DATA "${ENTITIES_DATA}" )
- else( )
- set( ENTITIES_DATA
- "${ENTITIES_DATA}<!ENTITY tde-release-date \"${TDE_RELEASE_DATE}\">\n" )
- endif( )
- if( "${ENTITIES_DATA}" MATCHES "ENTITY tde-copyright-date" )
- string( REGEX REPLACE "(ENTITY tde-copyright-date) \"[^\"]*\""
- "\\1 \"${TDE_RELEASE_COPYRIGHT}\"" ENTITIES_DATA "${ENTITIES_DATA}" )
- else( )
- set( ENTITIES_DATA
- "${ENTITIES_DATA}<!ENTITY tde-copyright-date \"${TDE_RELEASE_COPYRIGHT}\">\n" )
- endif( )
- file( WRITE ${ENTITIES_FILE} "${ENTITIES_DATA}" )
set( TDE_RELEASE_ENTITIES 1 CACHE INTERNAL "" )
endif( )