mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #40 from henriquegemignani/feature/blender-python
Search for Python instead of assuming it exists
This commit is contained in:
commit
e0eda8e4c5
|
@ -18,14 +18,10 @@ list(APPEND PY_SOURCES
|
||||||
|
|
||||||
bintoc(hecl_blendershell.cpp hecl_blendershell.py HECL_BLENDERSHELL)
|
bintoc(hecl_blendershell.cpp hecl_blendershell.py HECL_BLENDERSHELL)
|
||||||
|
|
||||||
if (WIN32)
|
find_package(Python COMPONENTS Interpreter REQUIRED)
|
||||||
set(PYTHON_EXECUTABLE python)
|
|
||||||
else ()
|
|
||||||
set(PYTHON_EXECUTABLE python3)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_custom_command(OUTPUT hecl.zip DEPENDS ${PY_SOURCES}
|
add_custom_command(OUTPUT hecl.zip DEPENDS ${PY_SOURCES}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ARGS zip_package.py ${CMAKE_CURRENT_BINARY_DIR}/hecl.zip
|
COMMAND ${Python_EXECUTABLE} ARGS zip_package.py ${CMAKE_CURRENT_BINARY_DIR}/hecl.zip
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Generating addon package")
|
COMMENT "Generating addon package")
|
||||||
bintoc(hecl_addon.cpp "${CMAKE_CURRENT_BINARY_DIR}/hecl.zip" HECL_ADDON)
|
bintoc(hecl_addon.cpp "${CMAKE_CURRENT_BINARY_DIR}/hecl.zip" HECL_ADDON)
|
||||||
|
|
Loading…
Reference in New Issue