Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions cmake/cmake/presets/all-disabled.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"EXT_XMLREADER": false,
"EXT_XMLWRITER": false,

"SAPI_CGI": false,
"SAPI_PHPDBG": false
"PHP_SAPI_CGI": false,
"PHP_SAPI_PHPDBG": false
}
},
{
Expand Down
14 changes: 7 additions & 7 deletions cmake/cmake/presets/all-enabled.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
"EXT_ZIP": true,
"EXT_ZLIB": true,

"SAPI_EMBED": true,
"SAPI_FPM": true,
"SAPI_FPM_ACL": true,
"SAPI_FPM_APPARMOR": true,
"SAPI_FPM_SELINUX": true,
"SAPI_FPM_SYSTEMD": true,
"SAPI_LITESPEED": true
"PHP_SAPI_EMBED": true,
"PHP_SAPI_FPM": true,
"PHP_SAPI_FPM_ACL": true,
"PHP_SAPI_FPM_APPARMOR": true,
"PHP_SAPI_FPM_SELINUX": true,
"PHP_SAPI_FPM_SYSTEMD": true,
"PHP_SAPI_LITESPEED": true
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions cmake/pear/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ block()
if(NOT TARGET PHP::SAPI::cli)
message(
FATAL_ERROR
"The 'PHP_PEAR' option requires PHP CLI SAPI. Please, set 'SAPI_CLI' to "
"'ON'."
"The 'PHP_PEAR' option requires PHP CLI SAPI. Please, set 'PHP_SAPI_CLI' "
"to 'ON'."
)
endif()

Expand Down
12 changes: 6 additions & 6 deletions cmake/sapi/apache2handler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Configure the `apache2handler` PHP SAPI.

## SAPI_APACHE2HANDLER
## PHP_SAPI_APACHE2HANDLER

* Default: `OFF`
* Values: `ON|OFF`
Expand All @@ -30,15 +30,15 @@ cmake -B php-build -DAPACHE2HANDLER=ON -DApache_EXECUTABLE=/opt/apache2/bin/apxs

include(FeatureSummary)

option(SAPI_APACHE2HANDLER "Enable the shared Apache 2 handler SAPI module")
option(PHP_SAPI_APACHE2HANDLER "Enable the shared Apache 2 handler SAPI module")

add_feature_info(
"sapi/apache2handler"
SAPI_APACHE2HANDLER
PHP_SAPI_APACHE2HANDLER
"Apache HTTP server module"
)

if(NOT SAPI_APACHE2HANDLER)
if(NOT PHP_SAPI_APACHE2HANDLER)
return()
endif()

Expand Down Expand Up @@ -88,9 +88,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND EXISTS ${Apache_LIBEXECDIR}/httpd.exp)
check_linker_flag(
C
"LINKER:-brtl;LINKER:-bI${Apache_LIBEXECDIR}/httpd.exp"
_HAVE_BRTL_FLAG_C
_PHP_HAVE_BRTL_FLAG_C
)
if(_HAVE_BRTL_FLAG_C)
if(_PHP_HAVE_BRTL_FLAG_C)
target_link_options(
php_sapi_apache2handler
PRIVATE
Expand Down
8 changes: 4 additions & 4 deletions cmake/sapi/cgi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Configure the `cgi` PHP SAPI.

## SAPI_CGI
## PHP_SAPI_CGI

* Default: `ON`
* Values: `ON|OFF`
Expand All @@ -14,15 +14,15 @@ Enable the PHP CGI (Common Gateway Interface) SAPI executable module.
include(CheckStructHasMember)
include(FeatureSummary)

option(SAPI_CGI "Enable the CGI (Common Gateway Interface) SAPI" ON)
option(PHP_SAPI_CGI "Enable the CGI (Common Gateway Interface) SAPI" ON)

add_feature_info(
"sapi/cgi"
SAPI_CGI
PHP_SAPI_CGI
"Common Gateway Interface executable"
)

if(NOT SAPI_CGI)
if(NOT PHP_SAPI_CGI)
return()
endif()

Expand Down
36 changes: 18 additions & 18 deletions cmake/sapi/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@

Configure the `cli` PHP SAPI.

## SAPI_CLI
## PHP_SAPI_CLI

* Default: `ON`
* Values: `ON|OFF`

Enable the PHP CLI (Command-Line Interpreter/Interface) SAPI executable module.

## SAPI_CLI_WIN_NO_CONSOLE
## PHP_SAPI_CLI_WIN_NO_CONSOLE

* Default: `OFF`
* Values: `ON|OFF`

Build console-less CLI SAPI. Same as the main CLI SAPI but without console (no
output is given).
Build additional console-less CLI SAPI executable (executable name `php-win`).
Same as the main CLI SAPI (`php`) but without the console (no output is given).

> [!NOTE]
> This option is only available when the target system is Windows.
Expand All @@ -28,27 +28,27 @@ include(CheckSymbolExists)
include(CMakeDependentOption)
include(FeatureSummary)

option(SAPI_CLI "Enable the CLI SAPI module" ON)
option(PHP_SAPI_CLI "Enable the CLI SAPI module" ON)
add_feature_info(
"sapi/cli"
SAPI_CLI
PHP_SAPI_CLI
"Command-Line Interpreter/Interface executable"
)

cmake_dependent_option(
SAPI_CLI_WIN_NO_CONSOLE
PHP_SAPI_CLI_WIN_NO_CONSOLE
"Build additional CLI SAPI without console (no output is given)"
OFF
[[SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
[[PHP_SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
OFF
)
add_feature_info(
"sapi/cli console-less"
SAPI_CLI_WIN_NO_CONSOLE
PHP_SAPI_CLI_WIN_NO_CONSOLE
"additional executable without console output"
)

if(NOT SAPI_CLI)
if(NOT PHP_SAPI_CLI)
return()
endif()

Expand Down Expand Up @@ -130,12 +130,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
)
endif()

if(SAPI_CLI_WIN_NO_CONSOLE)
add_executable(php_sapi_cli_win_no_console)
add_executable(PHP::SAPI::cli_win_no_console ALIAS php_sapi_cli_win_no_console)
if(PHP_SAPI_CLI_WIN_NO_CONSOLE)
add_executable(php_sapi_cli_win)
add_executable(PHP::SAPI::cli_win ALIAS php_sapi_cli_win)

target_sources(
php_sapi_cli_win_no_console
php_sapi_cli_win
PRIVATE
cli_win32.c
php_cli_process_title.c
Expand All @@ -144,26 +144,26 @@ if(SAPI_CLI_WIN_NO_CONSOLE)
)

set_target_properties(
php_sapi_cli_win_no_console
php_sapi_cli_win
PROPERTIES
OUTPUT_NAME ${PHP_PROGRAM_PREFIX}php-win${PHP_PROGRAM_SUFFIX}
)

target_compile_definitions(
php_sapi_cli_win_no_console
php_sapi_cli_win
PRIVATE
ZEND_ENABLE_STATIC_TSRMLS_CACHE
)

target_link_libraries(
php_sapi_cli_win_no_console
php_sapi_cli_win
PRIVATE
PHP::SAPI
shell32
)

target_link_options(
php_sapi_cli_win_no_console
php_sapi_cli_win
PRIVATE
/stack:67108864
)
Expand Down
8 changes: 4 additions & 4 deletions cmake/sapi/embed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Configure the `embed` PHP SAPI.

## SAPI_EMBED
## PHP_SAPI_EMBED

* Default: `OFF`
* Values: `ON|OFF`
Expand All @@ -19,15 +19,15 @@ to use PHP.

include(FeatureSummary)

option(SAPI_EMBED "Enable the Embed SAPI module")
option(PHP_SAPI_EMBED "Enable the Embed SAPI module")

add_feature_info(
"sapi/embed"
SAPI_EMBED
PHP_SAPI_EMBED
"module for embedding PHP into application"
)

if(NOT SAPI_EMBED)
if(NOT PHP_SAPI_EMBED)
return()
endif()

Expand Down
Loading
Loading