File: PythonMacros.cmake

package info (click to toggle)
pykde4 4%3A4.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,864 kB
  • ctags: 18,431
  • sloc: python: 2,063; cpp: 327; makefile: 52; sh: 5
file content (27 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (2)
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)