INSTALL(CODE "SET(PYTHON_FILE ${f})")
FOREACH(input ${PYFILE2COMPINST})
GET_FILENAME_COMPONENT(inputname ${input} NAME)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inputname} DESTINATION ${PYFILELOC})
+ INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")