Skip to content

Add minimal CMake setup - #26

Open
theblackunknown wants to merge 1 commit into
mainfrom
cmake-setup
Open

Add minimal CMake setup#26
theblackunknown wants to merge 1 commit into
mainfrom
cmake-setup

Conversation

@theblackunknown

Copy link
Copy Markdown
Member

Description

This pull request introduces a minimal CMake-based build system for the openpbr-bsdf project.
It exposes one CMake target for the OpenPBR header sources, and another to build and run the minimal example.
As a convenience for clients that prefer it, we also generate installation rules to install headers and a CMake Config package.

Motivation and Context

We want openpbr-bsdf to be easily consume by other projects, and providing a CMake build system is one step in this direction as its use is pervasive in the ecosystem.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@theblackunknown theblackunknown self-assigned this May 20, 2026
@theblackunknown theblackunknown added the enhancement New feature or request label May 20, 2026
@yoyonel

yoyonel commented Jul 7, 2026

Copy link
Copy Markdown

Good idea to propose to introduce this (good) building tool, but why changing many legacy files names/paths ? Why not just introduce CMake and follow the legacy tree files ? It's a bit confused for reviewing ...

@zacharypep

Copy link
Copy Markdown

This would be unnecessary bloat.

@theblackunknown

Copy link
Copy Markdown
Member Author

Good idea to propose to introduce this (good) building tool, but why changing many legacy files names/paths ? Why not just introduce CMake and follow the legacy tree files ? It's a bit confused for reviewing ...

The main reason to change paths was to end up with include paths which are scoped under a openpbr/ folder
image

We feel this a better hygiene than to install our headers without it as they would end up sibling to many other header files which do not follow this "scoped folder" approach and lead to a worse header discovery

We would rather proceed with such a change while the project is still new, rather than later when this project is more mature

@theblackunknown

Copy link
Copy Markdown
Member Author

This would be unnecessary bloat.

May I ask what are you considering bloat in this PR ?
We feel providing a CMake build system setup directly into this project provide a clear guidance for those using it as well.
Not providing a CMake build system will lead to everybody writing their own take on what a CMake integration will be like, and lead to a less consistent ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants