MACRO(PYTHON_SOURCES_COMPILE python_files sems_python_dir) FOREACH (python_file ${python_files}) EXECUTE_PROCESS(COMMAND python -c "import py_compile; py_compile.compile('${CMAKE_CURRENT_SOURCE_DIR}/${python_file}')") EXECUTE_PROCESS(COMMAND python -O -c "import py_compile; py_compile.compile('${CMAKE_CURRENT_SOURCE_DIR}/${python_file}')") INSTALL (FILES ${python_file} ${python_file}c ${python_file}o DESTINATION ${SEMS_EXEC_PREFIX}/${SEMS_LIBDIR}/sems/${sems_python_dir}) ENDFOREACH(python_file ${python_files}) ENDMACRO(PYTHON_SOURCES_COMPILE python_files sems_python_dir)