diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-02-03 20:07:12 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-02-03 20:07:12 (GMT) |
commit | a53db9b77a2df94cb9a1eaf4f6c305a92f432a14 (patch) | |
tree | 4407e5969d3849fcc3a938fdf8fcee50eef8d493 /addon/doxmlparser | |
parent | 095c5de5e4df192898f7f13e9b51524999615983 (diff) | |
download | Doxygen-a53db9b77a2df94cb9a1eaf4f6c305a92f432a14.zip Doxygen-a53db9b77a2df94cb9a1eaf4f6c305a92f432a14.tar.gz Doxygen-a53db9b77a2df94cb9a1eaf4f6c305a92f432a14.tar.bz2 |
Detect generateDS and recreate index.py/compound.py automatically
Diffstat (limited to 'addon/doxmlparser')
-rw-r--r-- | addon/doxmlparser/CMakeLists.txt | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/addon/doxmlparser/CMakeLists.txt b/addon/doxmlparser/CMakeLists.txt index dbbeee4..6ef5568 100644 --- a/addon/doxmlparser/CMakeLists.txt +++ b/addon/doxmlparser/CMakeLists.txt @@ -1,8 +1,22 @@ -# this custom rule depends on generateDS, install with 'pip install generateDS' -add_custom_target(update_doxmlparser - COMMENT "Updating doxmlparser module from XML schema files" - COMMAND generateDS --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd - COMMAND generateDS --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd - DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd - DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd - ) +find_package(generateDS) +if (GENERATEDS_FOUND) + add_custom_command( + COMMENT "Updating index.py from index.xsd..." + COMMAND ${GENERATEDS_EXECUTABLE} --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd + DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd + OUTPUT ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py + ) + add_custom_command( + COMMENT "Updating compound.py from compound.xsd..." + COMMAND ${GENERATEDS_EXECUTABLE} --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd + DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd + OUTPUT ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py + ) + add_custom_target( + update_doxmlparser_files ALL + DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py + DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py + COMMENT "Updating doxmlparser module..." + ) +endif() + |