3
3
4
4
Configure the `cli` PHP SAPI.
5
5
6
- ## SAPI_CLI
6
+ ## PHP_SAPI_CLI
7
7
8
8
* Default: `ON`
9
9
* Values: `ON|OFF`
10
10
11
11
Enable the PHP CLI (Command-Line Interpreter/Interface) SAPI executable module.
12
12
13
- ## SAPI_CLI_WIN_NO_CONSOLE
13
+ ## PHP_SAPI_CLI_WIN_NO_CONSOLE
14
14
15
15
* Default: `OFF`
16
16
* Values: `ON|OFF`
17
17
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).
20
20
21
21
> [!NOTE]
22
22
> This option is only available when the target system is Windows.
@@ -28,27 +28,27 @@ include(CheckSymbolExists)
28
28
include (CMakeDependentOption)
29
29
include (FeatureSummary)
30
30
31
- option (SAPI_CLI "Enable the CLI SAPI module" ON )
31
+ option (PHP_SAPI_CLI "Enable the CLI SAPI module" ON )
32
32
add_feature_info(
33
33
"sapi/cli"
34
- SAPI_CLI
34
+ PHP_SAPI_CLI
35
35
"Command-Line Interpreter/Interface executable"
36
36
)
37
37
38
38
cmake_dependent_option(
39
- SAPI_CLI_WIN_NO_CONSOLE
39
+ PHP_SAPI_CLI_WIN_NO_CONSOLE
40
40
"Build additional CLI SAPI without console (no output is given)"
41
41
OFF
42
- [[SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
42
+ [[PHP_SAPI_CLI AND CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
43
43
OFF
44
44
)
45
45
add_feature_info(
46
46
"sapi/cli console-less"
47
- SAPI_CLI_WIN_NO_CONSOLE
47
+ PHP_SAPI_CLI_WIN_NO_CONSOLE
48
48
"additional executable without console output"
49
49
)
50
50
51
- if (NOT SAPI_CLI )
51
+ if (NOT PHP_SAPI_CLI )
52
52
return ()
53
53
endif ()
54
54
@@ -130,12 +130,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
130
130
)
131
131
endif ()
132
132
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 )
136
136
137
137
target_sources (
138
- php_sapi_cli_win_no_console
138
+ php_sapi_cli_win
139
139
PRIVATE
140
140
cli_win32.c
141
141
php_cli_process_title.c
@@ -144,26 +144,26 @@ if(SAPI_CLI_WIN_NO_CONSOLE)
144
144
)
145
145
146
146
set_target_properties (
147
- php_sapi_cli_win_no_console
147
+ php_sapi_cli_win
148
148
PROPERTIES
149
149
OUTPUT_NAME ${PHP_PROGRAM_PREFIX} php-win${PHP_PROGRAM_SUFFIX}
150
150
)
151
151
152
152
target_compile_definitions (
153
- php_sapi_cli_win_no_console
153
+ php_sapi_cli_win
154
154
PRIVATE
155
155
ZEND_ENABLE_STATIC_TSRMLS_CACHE
156
156
)
157
157
158
158
target_link_libraries (
159
- php_sapi_cli_win_no_console
159
+ php_sapi_cli_win
160
160
PRIVATE
161
161
PHP::SAPI
162
162
shell32
163
163
)
164
164
165
165
target_link_options (
166
- php_sapi_cli_win_no_console
166
+ php_sapi_cli_win
167
167
PRIVATE
168
168
/stack:67108864
169
169
)
0 commit comments