mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Fix documentation in txt files
and include the "text_header_file.cmake" into the CMakeLists.txt
This commit is contained in:
parent
51de716caf
commit
5f4b4dca6f
@ -1,19 +0,0 @@
|
||||
|
||||
if (FILE AND SRC AND DST)
|
||||
if (APPLE)
|
||||
set(DIR_HINT "HOME/Library/Application Support/data/xca/${FILE}.txt")
|
||||
elseif (WIN32)
|
||||
set(DIR_HINT "PROFILE\\Application Data\\xca\\${FILE}.txt")
|
||||
else()
|
||||
set(DIR_HINT "/usr/local/share/xca/${FILE}.txt or HOME/.local/share/xca/${FILE}.txt")
|
||||
endif()
|
||||
|
||||
file(READ "${SRC}/preamble.txt" PREAMBLE)
|
||||
file(READ "${SRC}/${FILE}.text" CONT)
|
||||
file(WRITE "${DST}/${FILE}.txt"
|
||||
${PREAMBLE} "\n# "
|
||||
${DIR_HINT} "\n"
|
||||
${CONT})
|
||||
else()
|
||||
message(FATAL_ERROR "Mandatory FILE or SRC variable not defined")
|
||||
endif()
|
||||
@ -19,15 +19,25 @@ list(TRANSFORM XCA_TEMPLATES PREPEND ${S}/)
|
||||
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${XCA_TEMPLATES})
|
||||
list(APPEND APP_RESOURCES "${XCA_TEMPLATES}")
|
||||
|
||||
##### Text Files ids.txt eku.txt dn.txt
|
||||
##### Text Files oids.txt eku.txt dn.txt
|
||||
|
||||
macro(Text_header file)
|
||||
add_custom_command(OUTPUT "${D}/${file}.txt"
|
||||
COMMAND ${CMAKE_COMMAND} -DFILE=${file} -DSRC="${S}" -DDST="${D}"
|
||||
-P "${PROJECT_SOURCE_DIR}/cmake/text_header_file.cmake"
|
||||
DEPENDS "${S}/${file}.text" "${S}/preamble.txt"
|
||||
)
|
||||
list(APPEND TEXT_FILES "${D}/${file}.txt")
|
||||
if (APPLE)
|
||||
set(DIR_HINT "HOME/Library/Application Support/data/de.hohnstaedt.xca/${file}.txt")
|
||||
elseif (WIN32)
|
||||
set(DIR_HINT "PROFILE\\Application Data\\xca\\${file}.txt")
|
||||
else()
|
||||
set(DIR_HINT "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${file}.txt or \$HOME/.local/share/de.hohnstaedt.xca/${file}.txt")
|
||||
endif()
|
||||
|
||||
file(READ "${S}/preamble.txt" PREAMBLE)
|
||||
file(READ "${S}/${file}.text" CONT)
|
||||
file(WRITE "${D}/${file}.txt"
|
||||
${PREAMBLE} "\n# "
|
||||
${DIR_HINT} "\n"
|
||||
${CONT}
|
||||
)
|
||||
list(APPEND TEXT_FILES "${D}/${file}.txt")
|
||||
endmacro()
|
||||
|
||||
Text_header(dn)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user