1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# Python macros
# ~~~~~~~~~~~~~
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
# Cloned-and-hacked by Colin Watson <cjwatson@ubuntu.com>, removing bytecode
# support.
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# This file defines the following macros:
#
# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR)
# Install the SOURCE_FILE, which is a Python .py file, into the
# destination directory during install.
GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH)
MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR)
FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH})
ADD_CUSTOM_TARGET(compile_python_files ALL)
# Install the source file.
INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR})
ENDMACRO(PYTHON_INSTALL)
|