33
44Configure the `cli` PHP SAPI.
55
6- ## SAPI_CLI
6+ ## PHP_SAPI_CLI
77
88* Default: `ON`
99* Values: `ON|OFF`
1010
1111Enable the PHP CLI (Command-Line Interpreter/Interface) SAPI executable module.
1212
13- ## SAPI_CLI_WIN_NO_CONSOLE
13+ ## PHP_SAPI_CLI_WIN_NO_CONSOLE
1414
1515* Default: `OFF`
1616* Values: `ON|OFF`
1717
18- Build console-less CLI SAPI. Same as the main CLI SAPI but without console (no
19- output is given).
18+ Build additional console-less CLI SAPI executable (executable name `php-win`).
19+ Same as the main CLI SAPI (`php`) but without the console (no output is given).
2020
2121> [!NOTE]
2222> This option is only available when the target system is Windows.
@@ -28,27 +28,27 @@ include(CheckSymbolExists)
2828include (CMakeDependentOption)
2929include (FeatureSummary)
3030
31- option (SAPI_CLI "Enable the CLI SAPI module" ON )
31+ option (PHP_SAPI_CLI "Enable the CLI SAPI module" ON )
3232add_feature_info(
3333 "sapi/cli"
34- SAPI_CLI
34+ PHP_SAPI_CLI
3535 "Command-Line Interpreter/Interface executable"
3636)
3737
3838cmake_dependent_option(
39- SAPI_CLI_WIN_NO_CONSOLE
39+ PHP_SAPI_CLI_WIN_NO_CONSOLE
4040 "Build additional CLI SAPI without console (no output is given)"
4141 OFF
42- [[SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
42+ [[PHP_SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
4343 OFF
4444)
4545add_feature_info(
4646 "sapi/cli console-less"
47- SAPI_CLI_WIN_NO_CONSOLE
47+ PHP_SAPI_CLI_WIN_NO_CONSOLE
4848 "additional executable without console output"
4949)
5050
51- if (NOT SAPI_CLI )
51+ if (NOT PHP_SAPI_CLI )
5252 return ()
5353endif ()
5454
@@ -130,12 +130,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
130130 )
131131endif ()
132132
133- if (SAPI_CLI_WIN_NO_CONSOLE )
134- add_executable (php_sapi_cli_win_no_console )
135- add_executable (PHP::SAPI::cli_win_no_console ALIAS php_sapi_cli_win_no_console )
133+ if (PHP_SAPI_CLI_WIN_NO_CONSOLE )
134+ add_executable (php_sapi_cli_win )
135+ add_executable (PHP::SAPI::cli_win ALIAS php_sapi_cli_win )
136136
137137 target_sources (
138- php_sapi_cli_win_no_console
138+ php_sapi_cli_win
139139 PRIVATE
140140 cli_win32.c
141141 php_cli_process_title.c
@@ -144,26 +144,26 @@ if(SAPI_CLI_WIN_NO_CONSOLE)
144144 )
145145
146146 set_target_properties (
147- php_sapi_cli_win_no_console
147+ php_sapi_cli_win
148148 PROPERTIES
149149 OUTPUT_NAME ${PHP_PROGRAM_PREFIX} php-win${PHP_PROGRAM_SUFFIX}
150150 )
151151
152152 target_compile_definitions (
153- php_sapi_cli_win_no_console
153+ php_sapi_cli_win
154154 PRIVATE
155155 ZEND_ENABLE_STATIC_TSRMLS_CACHE
156156 )
157157
158158 target_link_libraries (
159- php_sapi_cli_win_no_console
159+ php_sapi_cli_win
160160 PRIVATE
161161 PHP::SAPI
162162 shell32
163163 )
164164
165165 target_link_options (
166- php_sapi_cli_win_no_console
166+ php_sapi_cli_win
167167 PRIVATE
168168 /stack:67108864
169169 )
0 commit comments