mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Use CMake's standard way to find Python.
Rather than have the python literal string, use CMake's find_package to find actual python executable. This is more useful if you have both Python 2 and 3 installed. CMake currently only supports python 2 and so will automatically find that version
This commit is contained in:
committed by
Tom Hughes
parent
14e6b07f63
commit
1b6b090cdc
@@ -5,6 +5,8 @@ project(node)
|
||||
# options
|
||||
#
|
||||
|
||||
find_package(PythonInterp 2 REQUIRED)
|
||||
|
||||
option(SHARED_V8 "use system shared V8 library")
|
||||
option(SHARED_LIBEV "use system shared libev library")
|
||||
option(SHARED_CARES "use system shared c-ares library")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/src/node_natives.h
|
||||
COMMAND tools/js2c.py ${PROJECT_BINARY_DIR}/src/node_natives.h ${js2c_files}
|
||||
COMMAND ${PYTHON_EXECUTABLE} tools/js2c.py ${PROJECT_BINARY_DIR}/src/node_natives.h ${js2c_files}
|
||||
DEPENDS ${js2c_files})
|
||||
|
||||
set(node_extra_src "src/platform_${node_platform}.cc")
|
||||
|
||||
@@ -43,7 +43,7 @@ if(NOT SHARED_V8)
|
||||
URL ${PROJECT_SOURCE_DIR}/deps/v8
|
||||
|
||||
BUILD_IN_SOURCE True
|
||||
BUILD_COMMAND sh -c "${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}"
|
||||
BUILD_COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}
|
||||
|
||||
SOURCE_DIR ${PROJECT_BINARY_DIR}/deps/v8
|
||||
# ignore this stuff, it's not needed for building v8 but ExternalProject
|
||||
@@ -74,7 +74,7 @@ if(NOT SHARED_V8)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn}
|
||||
COMMAND ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/deps/v8/
|
||||
DEPENDS ${v8_sources_dest}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user