Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/LibMultiSense/MultiSenseConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
include(CMakeFindDependencyMacro)
find_dependency(MultiSenseWire)
if (@BUILD_JSON_SERIALIZATION@)
find_dependency(nlohmann_json 3.9 REQUIRED)
find_dependency(nlohmann_json 3.9)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove the required flag here? I figured if the user wanted to build serialization, they should know if they are missing the associated dependencies

Copy link
Contributor Author

@ethanmusser ethanmusser Jan 24, 2026

Choose a reason for hiding this comment

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

It's just a misuse of the find_dependency() macro. The REQUIRED flag is automatically forwarded from the corresponding find_package() call made by the user in their CMake.

From the CMake docs:

The find_dependency() macro wraps a find_package() call for a package dependency:

find_dependency( [...])

It is designed to be used in a Package Configuration File (Config.cmake). find_dependency forwards the correct parameters for QUIET and REQUIRED which were passed to the original find_package() call.

endif ()
find_dependency(Threads)

Expand Down