##### template-init.cpp (generated) file( READ "names.conf" TEMPLATE_NAMES ) string( REGEX REPLACE "\n" ";" TEMPLATE_NAMES "${TEMPLATE_NAMES}" ) list( SORT TEMPLATE_NAMES ) file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/template-init.cpp "void CDisplayTemplateMgr::init() {\n" ) foreach( TEMPLATE_INFO IN LISTS TEMPLATE_NAMES ) string( REGEX REPLACE "^([^ \t]*)[ \t]+(.*)" "\\1" TEMPLATE_FILE "${TEMPLATE_INFO}" ) string( REGEX REPLACE "^([^ \t]*)[ \t]+(.*)" "\\2" TEMPLATE_NAME "${TEMPLATE_INFO}" ) if( NOT "${TEMPLATE_FILE}" STREQUAL "" ) file( READ ${TEMPLATE_FILE} TEMPLATE_CONTENT ) string( REGEX REPLACE "\n+$" "\n" TEMPLATE_CONTENT "${TEMPLATE_CONTENT}\n" ) string( REGEX REPLACE "\"" "\\\\\"" TEMPLATE_CONTENT "${TEMPLATE_CONTENT}" ) string( REGEX REPLACE "\n" "\\\\\n" TEMPLATE_CONTENT "${TEMPLATE_CONTENT}" ) string( REGEX REPLACE "[ \t]+" " " TEMPLATE_CONTENT "${TEMPLATE_CONTENT}" ) file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/template-init.cpp "\tm_templateMap[ i18n(\"${TEMPLATE_NAME}\") ] = \"${TEMPLATE_CONTENT}\";\n" ) endif() endforeach() file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/template-init.cpp "}\n" )