Skip to content

Commit

Permalink
Merge pull request #225 from catap/patch-1
Browse files Browse the repository at this point in the history
Use the right python to create `WRAP_MODULE_SOURCES`
  • Loading branch information
metthal committed Apr 18, 2023
2 parents 252144f + 3181529 commit 1d45f3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,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"
)
Expand Down

0 comments on commit 1d45f3c

Please sign in to comment.