tinyusdz icon indicating copy to clipboard operation
tinyusdz copied to clipboard

Separate Headers from Source

Open parsaiej opened this issue 10 months ago • 2 comments

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.

parsaiej avatar Jun 09 '25 05:06 parsaiej

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:

  1. 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.
  2. 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.
  3. 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).
  4. 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.
  5. 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!

syoyo avatar Jun 09 '25 19:06 syoyo

You can contribute organizing directory layout, and provide precompiled binary though CI

syoyo avatar Jun 09 '25 19:06 syoyo