8000 [Cmake] Split c++ and c find modules for Iso9660 and Cdio by fuzzard · Pull Request #26821 · xbmc/xbmc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Cmake] Split c++ and c find modules for Iso9660 and Cdio #26821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fuzzard
Copy link
Contributor
@fuzzard fuzzard commented May 31, 2025

Description

Introduce explicit find modules for cdio/cdio++ and iso9660/iso9660++

Motivation and context

Ideally each find module should find 1 library only. This will allow macro standardisation, but still explicitly check for required libs, as each is independent.

How has this been tested?

Configure with/without the pkgconfig files (iso9660.pc, iso9660++.pc, libcdio.pc, libcdio++.pc). iso9660pp is correctly disabled when any of the four are missing, but cdio is still found with only libcdio.pc. version requirements for find checks are also explicitly followed

What is the effect on users?

N/A

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@fuzzard fuzzard added this to the Piers 22.0 Alpha 1 milestone May 31, 2025
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jun 3, 2025
@jenkins4kodi
Copy link
Contributor

@fuzzard this needs a rebase

@garbear garbear requested a review from Copilot June 3, 2025 10:30
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR splits the find modules for C++ and C libraries into separate files for iso9660 and cdio, allowing each module to explicitly check its required dependency. Key changes include:

  • Introducing new find modules: FindIso9660.cmake, FindIso9660pp.cmake, and FindCdiopp.cmake.
  • Updating FindCdio.cmake to alias proper targets and changing the required dependency version for Cdio in CMakeLists.txt.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmake/modules/FindIso9660pp.cmake Updated to use find_package and module helper macros correctly
cmake/modules/FindIso9660.cmake New module added for iso9660 with explicit dependency checks
cmake/modules/FindCdiopp.cmake New module added for cdio++ with explicit dependency checks
cmake/modules/FindCdio.cmake Modified to update target aliasing and dependency options
CMakeLists.txt Updated dependency version requirement for Cdio

endif()
else()
include(FindPackageMessage)
find_package_message(Iso9660pp "Iso9660: Can not find libcdio (REQUIRED)" "")
Copy link
Preview
Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

The error message in this file incorrectly references 'Iso9660pp' for a missing 'libcdio' dependency; it should consistently refer to 'Iso9660' to match the module's purpose.

Suggested change
find_package_message(Iso9660pp "Iso9660: Can not find libcdio (REQUIRED)" "")
find_package_message(Iso9660 "Iso9660: Can not find libcdio (REQUIRED)" "")

Copilot uses AI. Check for mistakes.

endif()
else()
include(FindPackageMessage)
find_package_message(Cdiopp "Cdiopp: Can not find libcdio (REQUIRED)" "")
Copy link
Preview
Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

The error message states that 'libcdio' is missing, but since this module is for cdio++, it should indicate that 'libcdio++' is required.

Suggested change
find_package_message(Cdiopp "Cdiopp: Can not find libcdio (REQUIRED)" "")
find_package_message(Cdiopp "Cdiopp: Can not find libcdio++ (REQUIRED)" "")

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Rebase needed PR that does not apply/merge cleanly to current base branch v22 Piers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0