https://github.com/avast/yaramod/pull/225 --- deps/yaramod/src/CMakeLists.txt +++ deps/yaramod/src/CMakeLists.txt @@ -72,10 +72,13 @@ if(YARAMOD_DOCS) endif() # Command that creates files in ${WRAP_MODULE_SOURCES} +# simple call python won't work on macOS 12.3+ +# See: https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes#Python +find_package(Python REQUIRED COMPONENTS Interpreter) add_custom_command( OUTPUT ${WRAP_MODULE_SOURCES} # Create .h modules from .json modules - COMMAND python ${YARAMOD_SCRIPTS_DIR}/json_to_array.py -i "${YARAMOD_MODULES_DIR}" -o "${YARAMOD_MODULES_GENERATED_DIR}" + COMMAND ${Python_EXECUTABLE} ${YARAMOD_SCRIPTS_DIR}/json_to_array.py -i "${YARAMOD_MODULES_DIR}" -o "${YARAMOD_MODULES_GENERATED_DIR}" COMMENT "Converting yaramod modules from JSON to byte arrays in .cpp files" )