Skip to content
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

Allow ignoring macos package manager #594

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

viraptor
Copy link

Allow building without either homebrew or macports. This allows building in other environments, for example nixpkgs.

Allow building without either homebrew or macports. This allows building in other environments, for example nixpkgs.
@mmuetzel
Copy link
Contributor

It is a bit strange that this logic is part of the build system in the first place. It might be better to leave that to the user entirely...
An option to disable that check is probably a good first step in the direction of removing it entirely at some point in the future.

The NOT DEFINED IGNORE_PACKAGE_MANAGER is a bit odd though. It might lead to unexpected results if users configure with, e.g., -DIGNORE_PACKAGE_MANAGER=OFF.
Could you add an option like the following?

option(IGNORE_MACOS_PACKAGE_MANAGER "Don't search for packages that are installed with Homebrew or MacPorts on macOS" OFF)

Or maybe easier to handle in the longer run, a positive variable:

option(USE_MACOS_PACKAGE_MANAGER "Search for packages that are installed with Homebrew or MacPorts on macOS" ON)

And check its value (instead of its existence) like this:

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${USE_MACOS_PACKAGE_MANAGER})

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