@@ -15,15 +15,15 @@ works and how it can be used.
1515* [ 6. CMake minimum version for PHP] ( #6-cmake-minimum-version-for-php )
1616* [ 7. Interface library] ( #7-interface-library )
1717* [ 8. PHP CMake modules] ( #8-php-cmake-modules )
18- * [ 9. PHP extensions ] ( #9-php-extensions )
19- * [ 9.1. Properties ] ( #91-properties )
20- * [ 10 . PHP SAPI (Server API) modules] ( #10 -php-sapi-server-api-modules )
21- * [ 11 . Generated files] ( #11 -generated-files )
22- * [ 11 .1. Parser and lexer files] ( #111 -parser-and-lexer-files )
23- * [ 12 . Performance] ( #12 -performance )
24- * [ 13 . Testing] ( #13 -testing )
25- * [ 14 . Windows notes] ( #14 -windows-notes )
26- * [ 14 .1. Module-definition (.def) files] ( #141 -module-definition-def-files )
18+ * [ 9. Custom CMake properties ] ( #9-custom-cmake-properties )
19+ * [ 10. PHP extensions ] ( #10-php-extensions )
20+ * [ 11 . PHP SAPI (Server API) modules] ( #11 -php-sapi-server-api-modules )
21+ * [ 12 . Generated files] ( #12 -generated-files )
22+ * [ 12 .1. Parser and lexer files] ( #121 -parser-and-lexer-files )
23+ * [ 13 . Performance] ( #13 -performance )
24+ * [ 14 . Testing] ( #14 -testing )
25+ * [ 15 . Windows notes] ( #15 -windows-notes )
26+ * [ 15 .1. Module-definition (.def) files] ( #151 -module-definition-def-files )
2727
2828## 1. Directory structure
2929
@@ -321,7 +321,39 @@ include(PHP/NewModule)
321321* [ PHP/CheckCompilerFlag] ( /docs/cmake-modules/PHP/CheckCompilerFlag.md )
322322* [ PHP/SearchLibraries] ( /docs/cmake-modules/PHP/SearchLibraries.md )
323323
324- ## 9. PHP extensions
324+ ## 9. Custom CMake properties
325+
326+ * ` PHP_ALL_EXTENSIONS `
327+
328+ Global property set by the [ ` PHP/Extensions ` ] ( cmake-modules/PHP/Extensions.md )
329+ module.
330+
331+ * ` PHP_ALWAYS_ENABLED_EXTENSIONS `
332+
333+ Global property set by the [ ` PHP/Extensions ` ] ( cmake-modules/PHP/Extensions.md )
334+ module.
335+
336+ * ` PHP_EXTENSIONS `
337+
338+ Global property set by the [ ` PHP/Extensions ` ] ( cmake-modules/PHP/Extensions.md )
339+ module.
340+
341+ * ` PHP_PRIORITY `
342+
343+ Directory property set by the
344+ [ ` PHP/Extensions ` ] ( cmake-modules/PHP/Extensions.md ) module.
345+
346+ * ` PHP_THREAD_SAFETY `
347+
348+ Target property set by the
349+ [ ` PHP/ThreadSafety ` ] ( cmake-modules/PHP/ThreadSafety.md ) module on the
350+ ` PHP::configuration ` target, when thread safety is enabled.
351+
352+ * ` PHP_ZEND_EXTENSION `
353+
354+ See the [ ` PHP/Extensions ` ] ( cmake-modules/PHP/Extensions.md ) module.
355+
356+ ## 10. PHP extensions
325357
326358PHP has several ways to install PHP extensions:
327359
@@ -374,24 +406,7 @@ the extension's source directory.
374406Example of ` CMakeLists.txt ` for PHP extensions can be found in the
375407` ext/skeleton ` directory.
376408
377- ### 9.1. Properties
378-
379- Extensions can utilize the following custom CMake properties:
380-
381- * ` PHP_ZEND_EXTENSION `
382-
383- This property designates the extension as a Zend extension rather than a
384- standard PHP extension. Zend extensions function similarly to regular PHP
385- extensions, but they are loaded using the ` zend_extension ` INI directive and
386- possess an internally distinct structure with additional hooks. Typically
387- employed for advanced functionalities like debuggers and profilers, Zend
388- extensions offer enhanced capabilities.
389-
390- ``` cmake
391- set_target_properties(php_<extension_name> PROPERTIES PHP_ZEND_EXTENSION TRUE)
392- ```
393-
394- ## 10. PHP SAPI (Server API) modules
409+ ## 11. PHP SAPI (Server API) modules
395410
396411PHP works through the concept of SAPI modules located in the ` sapi ` directory.
397412
@@ -409,7 +424,7 @@ There are other SAPI modules located in the ecosystem:
409424* [ ngx-php] ( https://github.com/rryqszq4/ngx-php )
410425* ...
411426
412- ## 11 . Generated files
427+ ## 12 . Generated files
413428
414429During the build process, there are several files generated, some of which are
415430also tracked in the Git repository for a smoother workflow:
@@ -440,7 +455,7 @@ also tracked in the Git repository for a smoother workflow:
440455 └─ zend_config.w32.h # Zend engine configuration header for Windows
441456```
442457
443- ### 11 .1. Parser and lexer files
458+ ### 12 .1. Parser and lexer files
444459
445460So-called parser files are generated with
446461[ bison] ( https://www.gnu.org/software/bison/ ) tool from ` *.y ` source files to C
@@ -537,7 +552,7 @@ cmake -S <source-dir> -B <build-dir>
537552cmake --build < build-dir> -t php_generate_files
538553```
539554
540- ## 12 . Performance
555+ ## 13 . Performance
541556
542557When CMake is doing configuration phase, the profiling options can be used to do
543558build system performance analysis of CMake files.
@@ -548,7 +563,7 @@ cmake --profiling-output ./profile.json --profiling-format google-trace ../php-s
548563
549564![ CMake profiling] ( /docs/images/cmake-profiling.png )
550565
551- ## 13 . Testing
566+ ## 14 . Testing
552567
553568PHP source code tests (` *.phpt ` files) are written in PHP and are executed with
554569` run-tests.php ` script from the very beginning of the PHP development. When
@@ -580,9 +595,9 @@ using the `CMakePresets.json` file and its `testPresets` field.
580595ctest --preset all-enabled
581596```
582597
583- ## 14 . Windows notes
598+ ## 15 . Windows notes
584599
585- ### 14 .1. Module-definition (.def) files
600+ ### 15 .1. Module-definition (.def) files
586601
587602[ Module-definition (.def) files] ( https://learn.microsoft.com/en-us/cpp/build/reference/module-definition-dot-def-files )
588603are added to certain php-src folders where linker needs them when building DLL.
0 commit comments