I hate inconsistent filepaths, AKA Fix python not working on windows :<

This commit is contained in:
Phillip Stephens 2021-02-28 12:41:31 -08:00
parent cc6d977edc
commit eb40c8843f
1 changed files with 31 additions and 25 deletions

View File

@ -18,8 +18,14 @@ list(APPEND PY_SOURCES
bintoc(hecl_blendershell.cpp hecl_blendershell.py HECL_BLENDERSHELL)
if (WIN32)
set(PYTHON_EXECUTABLE python)
else ()
set(PYTHON_EXECUTABLE python3)
endif ()
add_custom_command(OUTPUT hecl.zip DEPENDS ${PY_SOURCES}
COMMAND python3 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}
COMMENT "Generating addon package")
bintoc(hecl_addon.cpp "${CMAKE_CURRENT_BINARY_DIR}/hecl.zip" HECL_ADDON)