silverqx / TinyORM

Modern C++ ORM library
https://www.tinyorm.org
MIT License
210 stars 22 forks source link

[cmake] Installing mdx documentation #32

Closed silverqx closed 10 months ago

silverqx commented 10 months ago

TInyORM use Docusaurus for documentation so all files in the docs/ folder are *.mdx files, what means they also contain javascript, or they contain also images which are in the assets/ folders.

Should I install this type of documentation with CMake? Should be installed also in vcpkg port?

silverqx commented 10 months ago

@SchaichAlonso

silverqx commented 10 months ago

Here is the link to the related source code.

Also, this command is buggy because it isn't recursive, it installs only depth 1.

silverqx commented 10 months ago

It should look something like this:

install(DIRECTORY "docs/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/mdx")

The question is whether I should actually install them.

SchaichAlonso commented 10 months ago

If in doubt, add an documentation option .

silverqx commented 10 months ago

If in doubt, add an documentation option .

Noo, that's not what I want to do.

For now, I have fixed it like this:

# TODO needs more work for the vcpkg port because eg. Qt6 is installing weird docs to doc/Qt6/ silverqx
if(NOT TINY_VCPKG)
    # The trailing / is important here
    install(DIRECTORY "docs/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/mdx")
endif()

Also noting that eg. Qt6 is also installing weird docs, look eg. to the vcpkg\installed\x64-windows\doc\Qt6\ folder. And also I have fastly checked other packages and didn't find any package that is installing docs in vcpkg. At sure in my vcpkg installed tree.

Do you know any vcpkg package that is installing docs? md or man page docs, I want to look for inspiration, I didn't find any but I only spent a few minutes on this.

silverqx commented 10 months ago

I think it's totally fine to not install these mdx docs in vcpkg, it's good for now and I leave it for later for solving or future enhancements.

SchaichAlonso commented 10 months ago

Do you know any vcpkg package that is installing docs? md or man page docs, I want to look for inspiration, I didn't find any but I only spent a few minutes on this.

opengl-registry installs documentation into share/opengl

silverqx commented 10 months ago

opengl-registry installs documentation into share/opengl

There isn't too much, one pdf file, ... and nothing special.

Anyway, I think the solution is good enough for now, thx for your advice. 👌