← Back to team overview

kicad-developers team mailing list archive

Kicad Documentation: Adding COMPONENT

 

Hi All,

For packaging of the documentation (new version at
https://github.com/KiCad/kicad-doc), it will help a lot if we can have
"COMPONENT" definition.
I propose a simple patch to do that.
It will add COMPONENT definition for <format>-<language> with:
<format> in html, pdf and epub
and
<language> in en, fr, de, ja...

Thanks,
Jean-Samuel Reynaud

diff --git a/CMakeModules/KiCadDocumentation.cmake b/CMakeModules/KiCadDocumentation.cmake
index a82bf8b..711c9b2 100644
--- a/CMakeModules/KiCadDocumentation.cmake
+++ b/CMakeModules/KiCadDocumentation.cmake
@@ -113,8 +113,8 @@ macro( KiCadDocumentation DOCNAME )
             add_dependencies( ${DOCNAME}_html_${LANGUAGE} ${DOCNAME}_translate_${LANGUAGE} )
             add_dependencies( ${DOCNAME} ${DOCNAME}_html_${LANGUAGE} )
 
-            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.html DESTINATION ./${LANGUAGE}/${DOCNAME}/html )
-            install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/images DESTINATION ./${LANGUAGE}/${DOCNAME}/html )
+            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.html DESTINATION ./${LANGUAGE}/${DOCNAME}/html COMPONENT html-${LANGUAGE} )
+            install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/images DESTINATION ./${LANGUAGE}/${DOCNAME}/html COMPONENT html-${LANGUAGE})
         endif()
 
 
@@ -129,7 +129,7 @@ macro( KiCadDocumentation DOCNAME )
             add_dependencies( ${DOCNAME}_pdf_${LANGUAGE} ${DOCNAME}_translate_${LANGUAGE} )
             add_dependencies( ${DOCNAME} ${DOCNAME}_pdf_${LANGUAGE} )
 
-            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.pdf DESTINATION ./${LANGUAGE}/${DOCNAME}/pdf )
+            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.pdf DESTINATION ./${LANGUAGE}/${DOCNAME}/pdf COMPONENT pdf-${LANGUAGE})
         endif()
 
 
@@ -144,7 +144,7 @@ macro( KiCadDocumentation DOCNAME )
             add_dependencies( ${DOCNAME}_epub_${LANGUAGE} ${DOCNAME}_translate_${LANGUAGE} )
             add_dependencies( ${DOCNAME} ${DOCNAME}_epub_${LANGUAGE} )
 
-            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.epub DESTINATION ./${LANGUAGE}/${DOCNAME}/epub )
+            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.epub DESTINATION ./${LANGUAGE}/${DOCNAME}/epub COMPONENT epub-${LANGUAGE})
         endif()
     endforeach()
 

Follow ups