Skip to content

Commit d005559

Browse files
committed
cmake: Allow one to select python3 from env
This will be useful for next debian release shipping python3 Change-Id: Ie3a9e8ea9152247efa85a4e87bd121016a466795 Bug: #1945 Bug-Debian: https://bugs.debian.org/936738 Forwarded: #1946 Origin: https://github.com/TizenTeam/iotjs/tree/sandbox/rzr/python/review/master IoT.js-DCO-1.0-Signed-off-by: Philippe Coval [email protected] Change-Id: Id4509a97f05eb77a40145b7aa50360b92f806fdf
1 parent 4ec6746 commit d005559

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmake/iotjs.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,17 @@ else()
372372
set(JS2C_PREPROCESS_ARGS -E -dD)
373373
endif()
374374

375+
if(NOT DEFINED PYTHON)
376+
set(PYTHON "python")
377+
endif()
378+
375379
string (REPLACE ";" "," IOTJS_JS_MODULES_STR "${IOTJS_JS_MODULES}")
376380
add_custom_command(
377381
OUTPUT ${IOTJS_SOURCE_DIR}/iotjs_js.c ${IOTJS_SOURCE_DIR}/iotjs_js.h
378382
COMMAND ${CMAKE_C_COMPILER} ${JS2C_PREPROCESS_ARGS} ${IOTJS_MODULE_DEFINES}
379383
${IOTJS_SOURCE_DIR}/iotjs_magic_strings.h
380384
> ${IOTJS_SOURCE_DIR}/iotjs_magic_strings.in
381-
COMMAND python ${ROOT_DIR}/tools/js2c.py
385+
COMMAND ${PYTHON} ${ROOT_DIR}/tools/js2c.py
382386
ARGS --buildtype=${JS2C_RUN_MODE}
383387
--modules "${IOTJS_JS_MODULES_STR}"
384388
${JS2C_SNAPSHOT_ARG}

deps/jerry

Submodule jerry updated 805 files

0 commit comments

Comments
 (0)