Commit 8504b380 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] don't compile .py files nor try to install them, fix #464

parent c27d5c87
...@@ -188,30 +188,8 @@ SET(PYTHON_FILES ...@@ -188,30 +188,8 @@ SET(PYTHON_FILES
) )
FOREACH(python ${PYTHON_FILES}) FOREACH(python ${PYTHON_FILES})
GET_FILENAME_COMPONENT(pythonFile ${python} NAME)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E ${LINK}
${${PROJECT_NAME}_SOURCE_DIR}/bindings/python/scripts/${python}
${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile})
# Generate pyc file
EXECUTE_PROCESS(COMMAND
${PYTHON_EXECUTABLE} -m py_compile
${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile})
# Tag pyc file as generated.
SET_SOURCE_FILES_PROPERTIES(
"${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c"
PROPERTIES GENERATED TRUE)
# Clean generated files.
SET_PROPERTY(
DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c")
INSTALL(FILES INSTALL(FILES
"${${PROJECT_NAME}_SOURCE_DIR}/bindings/python/scripts/${python}" "${${PROJECT_NAME}_SOURCE_DIR}/bindings/python/scripts/${python}"
"${${PROJECT_NAME}_BINARY_DIR}/bindings/python/${PROJECT_NAME}/${pythonFile}c"
DESTINATION ${${PYWRAP}_INSTALL_DIR}) DESTINATION ${${PYWRAP}_INSTALL_DIR})
ENDFOREACH(python) ENDFOREACH(python)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment