File tree Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ endif()
9393file (
9494 COPY
9595 ${PROJECT_SOURCE_DIR} /build /gen_stub.php
96- DESTINATION ${PROJECT_BINARY_DIR} /CMakeFiles/php_stubs
96+ DESTINATION ${PROJECT_BINARY_DIR} /CMakeFiles/PHP/Stubs
9797)
9898
9999block()
@@ -119,11 +119,11 @@ block()
119119 endforeach ()
120120
121121 set (PHP_SOURCES "$<JOIN:$<REMOVE_DUPLICATES:${stubs} >,$<SEMICOLON>>" )
122- file (READ ${CMAKE_CURRENT_LIST_DIR} /Stubs/PHPStubsGenerator .cmake.in content )
122+ file (READ ${CMAKE_CURRENT_LIST_DIR} /Stubs/StubsGenerator .cmake.in content )
123123 string (CONFIGURE "${content} " content @ONLY)
124124 file (
125125 GENERATE
126- OUTPUT ${PROJECT_BINARY_DIR} /CMakeFiles/php_stubs/PHPStubsGenerator .cmake
126+ OUTPUT ${PROJECT_BINARY_DIR} /CMakeFiles/PHP/Stubs/StubsGenerator .cmake
127127 CONTENT "${content} "
128128 )
129129
@@ -136,7 +136,8 @@ block()
136136 php_stubs ${targetOptions}
137137 COMMAND
138138 ${CMAKE_COMMAND}
139- -P ${PROJECT_BINARY_DIR} /CMakeFiles/php_stubs/PHPStubsGenerator .cmake
139+ -P ${PROJECT_BINARY_DIR} /CMakeFiles/PHP/Stubs/StubsGenerator .cmake
140140 VERBATIM
141+ COMMAND_EXPAND_LISTS
141142 )
142143endblock()
Original file line number Diff line number Diff line change @@ -7,17 +7,15 @@ if(NOT CMAKE_SCRIPT_MODE_FILE)
77endif ()
88
99set (sources "@PHP_SOURCES@" )
10+ set (phpCommand "@PHP_COMMAND@" )
11+ set (phpGenStubScriptSource "@PROJECT_SOURCE_DIR@/build/gen_stub.php" )
1012
1113# Ensure sources include only *.stub.php files.
1214list (FILTER sources INCLUDE REGEX [[\.stub\.php$]])
1315
1416# Create a list of sources that must be parsed by the generator.
15- if (@PROJECT_SOURCE_DIR @/build /gen_stub.php IS_NEWER_THAN ${CMAKE_CURRENT_LIST_FILE} )
16- file (
17- COPY
18- @PROJECT_SOURCE_DIR @/build /gen_stub.php
19- DESTINATION @PROJECT_BINARY_DIR @/CMakeFiles/php_stubs
20- )
17+ if (${phpGenStubScriptSource} IS_NEWER_THAN ${CMAKE_CURRENT_LIST_FILE} )
18+ file (COPY ${phpGenStubScriptSource} DESTINATION ${CMAKE_CURRENT_LIST_DIR} )
2119 set (stubs ${sources} )
2220 file (TOUCH ${CMAKE_CURRENT_LIST_FILE} )
2321else ()
@@ -35,15 +33,10 @@ endif()
3533
3634execute_process (
3735 COMMAND
38- ${CMAKE_COMMAND}
39- -E cmake_echo_color --blue --bold
40- "Regenerating *_arginfo.h headers from *.stub.php sources"
41- )
42-
43- execute_process (
36+ ${CMAKE_COMMAND} -E cmake_echo_color --blue --bold
37+ "Regenerating *_arginfo.h headers from *.stub.php sources"
4438 COMMAND
45- @PHP_COMMAND@ @PROJECT_BINARY_DIR @/CMakeFiles/php_stubs/gen_stub.php
46- ${stubs}
39+ ${phpCommand} ${CMAKE_CURRENT_LIST_DIR} /gen_stub.php ${stubs}
4740)
4841
4942# Ensure that *_arginfo.h headers are newer than their *.stub.php sources.
You can’t perform that action at this time.
0 commit comments