@@ -207,18 +207,19 @@ add_custom_target(generate_version_header
207207 "${CMAKE_BINARY_DIR } /version.h"
208208)
209209
210- # Include HeaderMake.cmake for HeaderMake command
211- include (${CMAKE_SOURCE_DIR } /src/main/cmake/HeaderMake.cmake )
212-
213210# Create a custom command for funccode_define generation
214211add_custom_command (
215212 OUTPUT "${CMAKE_BINARY_DIR } /Funccode_define.h"
216- COMMAND ${HEADER_MAKE_EXECUTABLE}
213+ COMMAND ${Python3_EXECUTABLE}
214+ "${CMAKE_SOURCE_DIR } /src/main/py/header_make.py"
217215 -in=${CMAKE_SOURCE_DIR}/sakura_core/Funccode_x.hsrc
218216 -out=${CMAKE_BINARY_DIR}/Funccode_define.h
219217 -mode=define
220- DEPENDS generate_header_make
218+ DEPENDS
219+ ${CMAKE_SOURCE_DIR } /src/main/py/header_make.py
220+ ${CMAKE_SOURCE_DIR } /sakura_core/Funccode_x.hsrc
221221 COMMENT "Generating Funccode_define.h"
222+ VERBATIM
222223)
223224
224225# Create a custom target that depends on the generated file
@@ -230,13 +231,17 @@ add_custom_target(generate_funccode_define
230231# Create a custom command for funccode_enum generation
231232add_custom_command (
232233 OUTPUT "${CMAKE_BINARY_DIR } /Funccode_enum.h"
233- COMMAND ${HEADER_MAKE_EXECUTABLE}
234+ COMMAND ${Python3_EXECUTABLE}
235+ "${CMAKE_SOURCE_DIR } /src/main/py/header_make.py"
234236 -in=${CMAKE_SOURCE_DIR}/sakura_core/Funccode_x.hsrc
235237 -out=${CMAKE_BINARY_DIR}/Funccode_enum.h
236238 -mode=enum
237239 -enum=EFunctionCode
238- DEPENDS generate_header_make
240+ DEPENDS
241+ ${CMAKE_SOURCE_DIR } /src/main/py/header_make.py
242+ ${CMAKE_SOURCE_DIR } /sakura_core/Funccode_x.hsrc
239243 COMMENT "Generating Funccode_enum.h"
244+ VERBATIM
240245)
241246
242247# Create a custom target that depends on the generated file
0 commit comments