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

Replace FindPHPSystem.cmake with FindPHP.cmake #29

Open
wants to merge 6 commits into
base: PHP-8.3
Choose a base branch
from

Conversation

petk
Copy link
Owner

@petk petk commented Dec 26, 2024

This renames the weird PHPSystem to simply PHP, however it may clash with variables set by project(PHP), so the find_package() is wrapped in the block() and propagates PHP_FOUND result variable. The PHP_EXECUTABLE is cache variable, so it's available outside of the block as expected. The PHP_FOUND is used in case when the found PHP version is not sufficient. In such case the PHP_EXECUTABLE will still be set.

@petk petk changed the title Rename PHPSystem Rename PHPSystem to PHP Jan 9, 2025
@petk petk force-pushed the patch-find-php branch 2 times, most recently from 5f09256 to 11e2ad3 Compare January 12, 2025 07:45
@petk petk changed the title Rename PHPSystem to PHP Replace FindPHPSystem.cmake with FindPHP.cmake Jan 13, 2025
@petk petk force-pushed the patch-find-php branch 2 times, most recently from d853ae9 to 717fc45 Compare January 14, 2025 18:27
petk added 6 commits January 15, 2025 19:23
This renames the weird PHPSystem to simply PHP, however it may clash
with variables set by `project(PHP)`, so the `find_package()` is wrapped
in the `block()` and propagates PHP_FOUND. The PHP_EXECUTABLE is cache
variable, so it's available outside of the block as expected.
This enables using the same find module in various scenarios:
- building PHP extension with CMake
- building application with embedded PHP
- finding only PHP executable
This adds the config files for finding PHP when using find_package(PHP)
without find module (the CONFIG mode).

Further improvements and refactorings in the next commits...
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