Vcpkg fixes#5
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the docraft project's directory layout by moving all source and header files under a docraft/ subdirectory, updating all #include paths accordingly. It also adds Apache 2.0 license headers, sets up proper CMake packaging for vcpkg compatibility, and removes the release GitHub Actions workflow.
Changes:
- Moved all includes from flat paths (e.g.,
"model/docraft_text.h") to namespaced paths (e.g.,"docraft/model/docraft_text.h") across all source, header, test, and documentation files. - Added Apache 2.0 license headers to all source and header files, and added proper CMake package configuration (
DocraftConfig.cmake.in, install targets withGNUInstallDirs). - Restructured
CMakeLists.txtto usedocraft/prefixed source paths, added an alias target, and updated install rules.
Reviewed changes
Copilot reviewed 220 out of 223 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Added GNUInstallDirs, package config generation, renamed project |
| docraft/CMakeLists.txt | Updated all source/header paths to docraft/ prefix, added alias target, proper install rules |
| cmake/DocraftConfig.cmake.in | New CMake package config for downstream consumers |
| docraft/src/docraft/**/*.cc | Updated include paths, added license headers, moved files |
| docraft/include/docraft/**/*.h | Updated include paths, added license headers, moved files |
| docraft/test/**/*.cc | Updated include paths to docraft/ prefix |
| doc//*.md, doc//*.rst | Updated include paths in documentation examples |
| .cmake/*.cmake | Updated generated header include path |
| .github/workflows/release.yml | Removed release workflow |
Comments suppressed due to low confidence (10)
docraft/src/docraft/main.cpp:322
- This error message was corrupted by the find-and-replace.
"docraft/craft file not found: "should be"Craft file not found: ". The word "Craft" here refers to the file type, not a directory path.
docraft/src/docraft/model/docraft_foreach.cc:23 - This comment was corrupted by the find-and-replace.
"docraft/model"in the comment should remain"model". The comment describes the XML attribute name, not a file path.
docraft/include/docraft/model/docraft_foreach.h:27 - This documentation comment was corrupted by the find-and-replace.
"docraft/model"attribute should remain"model"- it refers to the XML attribute name, not a file path.
docraft/test/docraft/docraft_document_test.cc:13 - This include was not updated to use the
docraft/prefix like all the other includes in this file. It should be"docraft/utils/docraft_mock_rendering_backend.h"to be consistent with the pattern applied everywhere else in this PR.
docraft/src/docraft/layout/docraft_layout_engine.cc:36 - The
docraft_logger.hinclude was removed fromdocraft_layout_engine.cc. The original file had#include "utils/docraft_logger.h"which should have been updated to#include "docraft/utils/docraft_logger.h"rather than removed, unless the logger is no longer used in this file.
docraft/src/docraft/templating/docraft_template_engine.cc:212 - This error message was corrupted by the find-and-replace operation. The original message was
"Model for foreach node is not an array: "but it was changed to"docraft/model for foreach node is not an array: ". The word "Model" here refers to the data model concept, not themodel/directory path. The same issue affects thethrowon the next line.
docraft/src/docraft/model/docraft_table.cc:416 - This error message was corrupted by the find-and-replace.
"docraft/model template not set"should be"Model template not set". The word "Model" here refers to the data model concept, not a file path.
docraft/src/docraft/docraft_document_context.cc:101 - This error message was corrupted by the find-and-replace.
"docraft/renderer not set in DocraftPDFContext"should be"Renderer not set in DocraftPDFContext". The word "Renderer" here is a concept, not a file path.
docraft/test/docraft/docraft_color_test.cc:2 - This include uses a relative path
"../../include/docraft/docraft_color.h"while all other test files in this PR use the project-style include path like"docraft/docraft_color.h". This should be updated to be consistent.
docraft/src/docraft/renderer/painter/docraft_table_painter.cc:22 - The
docraft_font_applier.hinclude was removed from the table painter, but it was present in the original. If the table painter uses font applier functionality, this could cause a compilation error. The original had#include "generic/docraft_font_applier.h"which should have been updated to#include "docraft/generic/docraft_font_applier.h"rather than removed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @@ -38,8 +38,8 @@ Build a document entirely from C++ without any ``.craft`` file: | |||
| .. code-block:: cpp | |||
|
|
|||
| #include "docraft_document.h" | |||
There was a problem hiding this comment.
The documentation example still uses the old include path "docraft_document.h" instead of "docraft/docraft_document.h". This is inconsistent with the other includes in the same code block that were updated.
| #include "docraft_document.h" | |
| #include "docraft/docraft_document.h" |
* fix(project): update version to 1.0.0 for stable release * fix(cmake): update installation directory for CMake configuration * fix(cmake): update installation path for include directory * fix(cmake): correct path for DocraftConfig.cmake input file * fix(cmake): update include paths for source files and documentation * fix(license): add Apache 2.0 license header to source files * fix(cmake): update installation directory for include files * release workflow removed --------- Co-authored-by: cadons <cadons@mail.umbranet.ovh>
No description provided.