Separate Headers from Source
TinyUSDZ would be easier middleware to adopt if the headers were separated out from the source files. This way we can host just the headers and precompiled binaries in our project source trees.
From Copilot:
Issue #238 in the lighttransport/tinyusdz repository proposes separating headers from source files to simplify adoption of TinyUSDZ middleware.
Possible Solution
To address this issue, the following steps could be implemented:
-
Organize Headers and Source Files:
- Create a dedicated directory structure for headers (e.g.,
include/) and source files (e.g.,src/). - Move all public header files (files needed by external projects) to the
include/directory. - Keep implementation-specific headers within the
src/directory if they aren't needed externally.
- Create a dedicated directory structure for headers (e.g.,
-
Update Build System:
- Modify the build system (e.g., CMake, Makefile) to include the
include/directory in the public interface for library consumers. - Ensure paths are updated so that the compiler can find headers in their new location.
- Modify the build system (e.g., CMake, Makefile) to include the
-
Precompiled Binaries:
- Provide precompiled binaries for common platforms (e.g., Windows, Linux, macOS) and ensure compatibility with the separated headers.
- Distribute these binaries alongside the headers, or make them available via package managers (e.g., vcpkg, conan).
-
Documentation:
- Update documentation to reflect the new structure and usage guidelines for integrating TinyUSDZ.
- Include instructions on how to use the precompiled binaries and link against the library.
-
Backward Compatibility:
- If the change affects existing projects, consider providing a transition guide or maintaining backward compatibility for a certain period.
By implementing these steps, TinyUSDZ can become easier for developers to adopt while maintaining a clean and organized project structure. Let me know if you'd like further details on any specific aspect!
You can contribute organizing directory layout, and provide precompiled binary though CI