Skip to content

Conversation

@emilsas
Copy link
Collaborator

@emilsas emilsas commented Jan 14, 2026

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Jan 14, 2026

Walkthrough

CMakeLists.txt now declares a MODULE library target named obs-moq and replaces all references to the previous project target with obs-moq for linking, sources, and property configuration. Conditional logic for locating libobs was changed to depend on BUILD_PLUGIN. target_link_libraries, target_sources, include/link directories, and set_target_properties calls were updated to reference obs-moq. CMakePresets.json adds a cached BUILD_PLUGIN variable set to true in the template configure preset.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Edit CMake config to reuse it into moqbs' is vague and does not clearly describe the actual changes, which involve renaming the library target from ${CMAKE_PROJECT_NAME} to obs-moq and restructuring CMake configuration. Consider using a more descriptive title like 'Rename CMake library target to obs-moq' or 'Refactor CMake build to use explicit obs-moq target name'.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the intention aligns with the changes. Add a description explaining the purpose of renaming the target to obs-moq and the benefits of the CMake restructuring.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4898375 and 0b788ad.

📒 Files selected for processing (1)
  • CMakeLists.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Project 🧱 / Build for macOS 🍏
  • GitHub Check: Build Project 🧱 / Build for Windows 🪟
  • GitHub Check: Build Project 🧱 / Build for Ubuntu 🐧 (ubuntu-24.04)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CMakeLists.txt (1)

43-54: Inconsistent target reference will break the build when ENABLE_QT is enabled.

Lines 46-53 still reference ${CMAKE_PROJECT_NAME} while the target was renamed to obs-moq. This will either cause a CMake error or apply options to the wrong target.

🐛 Proposed fix
 if(ENABLE_QT)
   find_package(Qt6 COMPONENTS Widgets Core)
   target_link_libraries(obs-moq PRIVATE Qt6::Core Qt6::Widgets)
   target_compile_options(
-    ${CMAKE_PROJECT_NAME}
+    obs-moq
     PRIVATE $<$<C_COMPILER_ID:Clang,AppleClang>:-Wno-quoted-include-in-framework-header -Wno-comma>
   )
   set_target_properties(
-    ${CMAKE_PROJECT_NAME}
+    obs-moq
     PROPERTIES AUTOMOC ON AUTOUIC ON AUTORCC ON
   )
 endif()
🧹 Nitpick comments (2)
CMakeLists.txt (2)

16-18: Prefer idiomatic CMake conditional syntax.

Using ${BUILD_PLUGIN} inside if() expands the variable before evaluation, which can behave unexpectedly if the variable is unset or has non-boolean values. The idiomatic CMake approach is to reference the variable directly.

♻️ Suggested change
-if(NOT ${BUILD_PLUGIN})
+if(NOT BUILD_PLUGIN)
   find_package(libobs REQUIRED)
 endif()

69-73: Same CMake conditional syntax concern.

Consistent with the earlier suggestion, prefer if(BUILD_PLUGIN) over if(${BUILD_PLUGIN}).

♻️ Suggested change
-if(${BUILD_PLUGIN})
+if(BUILD_PLUGIN)
   set_target_properties_plugin(obs-moq PROPERTIES OUTPUT_NAME ${_name})
 else()
   set_target_properties_obs(obs-moq PROPERTIES FOLDER plugins PREFIX "")
 endif()
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec55ce3 and c05b9ba.

📒 Files selected for processing (2)
  • CMakeLists.txt
  • CMakePresets.json
🧰 Additional context used
📓 Path-based instructions (2)
CMakePresets.json

📄 CodeRabbit inference engine (CLAUDE.md)

Specify MOQ_VERSION in CMakePresets.json to control libmoq library version (platform-specific targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc)

Files:

  • CMakePresets.json
**/CMakeLists.txt

📄 CodeRabbit inference engine (CLAUDE.md)

Use ./build-aux/run-gersemi for CMake file formatting

Files:

  • CMakeLists.txt
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: For local moq library development, use `just setup ../moq` to point CMake to a local moq repository instead of downloading pre-built binaries
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to CMakePresets.json : Specify MOQ_VERSION in `CMakePresets.json` to control libmoq library version (platform-specific targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc)
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to obs-moq.cpp : Plugin initialization must call `obs_module_load()` in `obs-moq.cpp`, configure Rust library logging via `moq_log_level()`, and register three components: service, output, and source
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to **/*.{cpp,h,hpp} : Use logging macros from `logger.h`: `LOG_DEBUG()`, `LOG_INFO()`, `LOG_WARNING()`, `LOG_ERROR()` with `[obs-moq]` prefix
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to CMakePresets.json : Specify MOQ_VERSION in `CMakePresets.json` to control libmoq library version (platform-specific targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc)

Applied to files:

  • CMakePresets.json
  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to obs-moq.cpp : Plugin initialization must call `obs_module_load()` in `obs-moq.cpp`, configure Rust library logging via `moq_log_level()`, and register three components: service, output, and source

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to **/*.{cpp,h,hpp} : Use logging macros from `logger.h`: `LOG_DEBUG()`, `LOG_INFO()`, `LOG_WARNING()`, `LOG_ERROR()` with `[obs-moq]` prefix

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: For local moq library development, use `just setup ../moq` to point CMake to a local moq repository instead of downloading pre-built binaries

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-source.{cpp,h} : MoQ Source (`moq-source.cpp/h`) is an experimental feature for receiving MoQ broadcasts

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-output.cpp : Use FFI calls `moq_track_send_*()` to send encoder packets from `MoQOutput::Data()` through `VideoData()`/`AudioData()` to the MoQ library

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-service.{cpp,h} : MoQ Service (`moq-service.cpp/h`) should configure connection to MoQ relay: server URL, path, and supported codecs

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-output.{cpp,h} : MoQ Output (`moq-output.cpp/h`) should handle streaming output, manage MoQ server session, and process audio/video data packets

Applied to files:

  • CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Project 🧱 / Build for macOS 🍏
  • GitHub Check: Build Project 🧱 / Build for Ubuntu 🐧 (ubuntu-24.04)
  • GitHub Check: Build Project 🧱 / Build for Windows 🪟
🔇 Additional comments (3)
CMakePresets.json (1)

16-16: LGTM!

The BUILD_PLUGIN cache variable is correctly added to the template preset and will propagate to all derived presets. This aligns with the conditional logic in CMakeLists.txt for controlling libobs resolution and target properties.

CMakeLists.txt (2)

14-14: LGTM!

Creating a dedicated obs-moq target instead of using ${CMAKE_PROJECT_NAME} makes the build configuration more explicit and reusable from other CMake projects like moqbs.


59-67: LGTM!

FFmpeg dependencies and source files are correctly linked/added to the obs-moq target.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@CMakeLists.txt`:
- Around line 69-73: The call to set_target_properties_obs(obs-moq PROPERTIES
FOLDER plugins PREFIX "") is calling an undefined helper
(set_target_properties_obs) when BUILD_PLUGIN is false; either add a definition
for set_target_properties_obs in the platform helper files
(cmake/*/helpers*.cmake) mirroring the behavior of set_target_properties_plugin,
or replace this call with the correct existing function (for example use the
CMake builtin set_target_properties(obs-moq PROPERTIES FOLDER plugins PREFIX "")
or reuse set_target_properties_plugin(obs-moq PROPERTIES ...) if that matches
the intended behavior); update the helper implementations consistently across
the platform-specific helper modules so obs-moq gets the same target properties.
🧹 Nitpick comments (1)
CMakeLists.txt (1)

16-19: Consider adding a target existence check for clarity.

When BUILD_PLUGIN is true, the code assumes OBS::libobs is provided by the parent build. If it's not, the build will fail with an unclear error at link time.

💡 Optional: Add a guard for better error messaging
 if(NOT BUILD_PLUGIN)
   find_package(libobs REQUIRED)
+else()
+  if(NOT TARGET OBS::libobs)
+    message(FATAL_ERROR "BUILD_PLUGIN is set but OBS::libobs target not found. This CMakeLists.txt must be included from OBS source tree.")
+  endif()
 endif()
 target_link_libraries(obs-moq PRIVATE OBS::libobs)
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c05b9ba and 4898375.

📒 Files selected for processing (1)
  • CMakeLists.txt
🧰 Additional context used
📓 Path-based instructions (1)
**/CMakeLists.txt

📄 CodeRabbit inference engine (CLAUDE.md)

Use ./build-aux/run-gersemi for CMake file formatting

Files:

  • CMakeLists.txt
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: For local moq library development, use `just setup ../moq` to point CMake to a local moq repository instead of downloading pre-built binaries
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to obs-moq.cpp : Plugin initialization must call `obs_module_load()` in `obs-moq.cpp`, configure Rust library logging via `moq_log_level()`, and register three components: service, output, and source
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to CMakePresets.json : Specify MOQ_VERSION in `CMakePresets.json` to control libmoq library version (platform-specific targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc)
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to **/*.{cpp,h,hpp} : Use logging macros from `logger.h`: `LOG_DEBUG()`, `LOG_INFO()`, `LOG_WARNING()`, `LOG_ERROR()` with `[obs-moq]` prefix
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to obs-moq.cpp : Plugin initialization must call `obs_module_load()` in `obs-moq.cpp`, configure Rust library logging via `moq_log_level()`, and register three components: service, output, and source

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to **/*.{cpp,h,hpp} : Use logging macros from `logger.h`: `LOG_DEBUG()`, `LOG_INFO()`, `LOG_WARNING()`, `LOG_ERROR()` with `[obs-moq]` prefix

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to CMakePresets.json : Specify MOQ_VERSION in `CMakePresets.json` to control libmoq library version (platform-specific targets: aarch64-apple-darwin, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc)

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: For local moq library development, use `just setup ../moq` to point CMake to a local moq repository instead of downloading pre-built binaries

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-source.{cpp,h} : MoQ Source (`moq-source.cpp/h`) is an experimental feature for receiving MoQ broadcasts

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-output.cpp : Use FFI calls `moq_track_send_*()` to send encoder packets from `MoQOutput::Data()` through `VideoData()`/`AudioData()` to the MoQ library

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-output.{cpp,h} : MoQ Output (`moq-output.cpp/h`) should handle streaming output, manage MoQ server session, and process audio/video data packets

Applied to files:

  • CMakeLists.txt
📚 Learning: 2026-01-12T01:37:10.897Z
Learnt from: CR
Repo: moq-dev/obs PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-12T01:37:10.897Z
Learning: Applies to moq-service.{cpp,h} : MoQ Service (`moq-service.cpp/h`) should configure connection to MoQ relay: server URL, path, and supported codecs

Applied to files:

  • CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Project 🧱 / Build for Ubuntu 🐧 (ubuntu-24.04)
  • GitHub Check: Build Project 🧱 / Build for macOS 🍏
  • GitHub Check: Build Project 🧱 / Build for Windows 🪟
🔇 Additional comments (4)
CMakeLists.txt (4)

14-14: LGTM!

Hardcoding the target name obs-moq instead of using ${CMAKE_PROJECT_NAME} correctly enables this CMakeLists.txt to be included as a subdirectory in external projects like moqbs.


25-35: LGTM!

Target references correctly updated to obs-moq for both local and fetched moq library linkage.


38-61: LGTM!

Target references consistently updated to obs-moq across frontend API, Qt, and FFmpeg configurations.


63-67: Target reference updated correctly; consider running formatter.

The target reference to obs-moq is correct. As per coding guidelines, consider running ./build-aux/run-gersemi to ensure consistent CMake formatting (e.g., one source file per line).

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@emilsas emilsas merged commit dafe3b2 into moq-dev:main Jan 14, 2026
3 of 6 checks passed
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