diff options
| author | A2va <[email protected]> | 2022-12-08 16:19:21 +0100 |
|---|---|---|
| committer | A2va <[email protected]> | 2022-12-08 16:19:21 +0100 |
| commit | 6da878e3e3c50cc416f360541ef077c2bced11b2 (patch) | |
| tree | 96fe3bab9467b9875af130c5d3b0c46bb4f8daad | |
| parent | e7965d5d0176bf620fac9a71e48bfa588314c956 (diff) | |
Move set version outside of _generate_doxyfile as they keeps changing
Generate doxyfile in project root
| -rw-r--r-- | xmake/plugins/doxygen/main.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xmake/plugins/doxygen/main.lua b/xmake/plugins/doxygen/main.lua index 6b68d633e..478613948 100644 --- a/xmake/plugins/doxygen/main.lua +++ b/xmake/plugins/doxygen/main.lua @@ -30,7 +30,7 @@ import("private.action.require.impl.install_packages") function _generate_doxyfile() -- generate the default doxyfile - local doxyfile = path.join(os.tmpdir(), "doxyfile") + local doxyfile = path.join(project.directory(), "doxyfile") os.vrunv(doxygen.program, {"-g", doxyfile}) -- enable recursive @@ -58,15 +58,6 @@ function _generate_doxyfile() os.mkdir(outputdir) end - -- set the project version - -- - -- PROJECT_NUMBER = - -- - local version = project.version() - if version then - io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version)) - end - -- set the project name -- -- PROJECT_NAME = @@ -111,6 +102,15 @@ function main() end assert(os.isfile(doxyfile), "%s not found!", doxyfile) + -- set the project version + -- + -- PROJECT_NUMBER = + -- + local version = project.version() + if version then + io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version)) + end + -- generate document cprint("generating ..${beer}") os.vrunv(doxygen.program, {doxyfile}, {curdir = project.directory()}) |
