Skip to content

cmake: make pre-built library discoverable via CMake configuration files (rebased to master)#13

Open
jeongseok-meta wants to merge 2 commits intomitsuba-renderer:masterfrom
jeongseok-meta:feat/reusable-cmake
Open

cmake: make pre-built library discoverable via CMake configuration files (rebased to master)#13
jeongseok-meta wants to merge 2 commits intomitsuba-renderer:masterfrom
jeongseok-meta:feat/reusable-cmake

Conversation

@jeongseok-meta
Copy link

Hello, I'm creating this PR to help move forward with PR 7 in case the only blocker is that it hasn't been rebased onto the master branch. Please feel free to merge this PR or update the original PR by simply rebasing it.

Closing #7

Co-Authored-By: Someone Serge <sergei.kozlukov@aalto.fi>
@wjakob
Copy link
Member

wjakob commented Feb 1, 2026

Sorry about the huge delay in looking at this PR. Is it still relevant? I am wondering if we can avoid adding a CMake-internal config file to the root directory (nanothreadConfig.cmake). It seems to me that this can just be auto-generated.

@jeongseok-meta
Copy link
Author

Yes, it'd be much cleaner. Updated!

@wjakob
Copy link
Member

wjakob commented Feb 1, 2026

Isn't it redundant to use file(WRITE and configure_package_config_file? AFAIK the second is just a way of substituting CMake variables, but we can already do that when using file(WRITE

@jeongseok-meta
Copy link
Author

AFAIK, we need two steps: first, generate a file that contains @PACKAGE_INIT@ (via file(WRITE ...)), and then generate the final config file that expands @PACKAGE_INIT@ (via configure_package_config_file(...)). This is necessary because configure_package_config_file(...) only accepts a file as input.

@jeongseok-meta
Copy link
Author

In any case, this is just one idea to help move the original PR forward, so please feel free to adjust it as needed :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants