Skip to content

fix(cmake): build pj_media inside PJ_BUILD_DATASTORE guard#70

Merged
pabloinigoblasco merged 1 commit into
developmentfrom
fix/pj-media-build-option
Apr 24, 2026
Merged

fix(cmake): build pj_media inside PJ_BUILD_DATASTORE guard#70
pabloinigoblasco merged 1 commit into
developmentfrom
fix/pj-media-build-option

Conversation

@pabloinigoblasco
Copy link
Copy Markdown
Collaborator

Summary

pj_media_core depends on pj_datastore (object_store.hpp), but the three add_subdirectory(pj_media/...) calls were unconditional — outside the if(PJ_BUILD_DATASTORE) block. When consumers build with PJ_BUILD_DATASTORE=OFF (e.g. plugin-only builds via CPM), the datastore include directories are not available and pj_media_core fails with a missing-header error.

Fix: move the pj_media subdirectories inside the existing PJ_BUILD_DATASTORE guard. This expresses the real architectural dependency: media requires the datastore. Consumers that opt out of the datastore no longer hit the build failure.

Test plan

  • Full build (PJ_BUILD_DATASTORE=ON): datastore + media both compile as before
  • Plugin-only build (PJ_BUILD_DATASTORE=OFF): neither datastore nor media are built, no errors
  • pj-official-plugins CI passes after this merges to development

pj_media_core depends on pj_datastore (object_store.hpp), so it cannot
build when PJ_BUILD_DATASTORE=OFF. Moving the three pj_media
add_subdirectory calls inside the existing PJ_BUILD_DATASTORE block
expresses the real dependency: media requires the datastore, and
consumers that opt out of the datastore (e.g. plugin-only builds) no
longer hit a missing-header failure.
@pabloinigoblasco pabloinigoblasco merged commit 9e18019 into development Apr 24, 2026
2 checks passed
@pabloinigoblasco pabloinigoblasco deleted the fix/pj-media-build-option branch May 4, 2026 12:37
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.

1 participant