hlrc / client / python / CMakeLists.txt @ master
History | View | Annotate | Download (765 Bytes)
1 | 96a1894b | Simon Schulz | ### Maintainer: sschulz,gwalck[@techfak.uni-bielefeld.de] ### |
---|---|---|---|
2 | cmake_minimum_required(VERSION 2.8) |
||
3 | PROJECT(hlrc_client_python) |
||
4 | SET(CMAKE_BUILD_TYPE distribution) |
||
5 | |||
6 | find_program(PYTHON "python") |
||
7 | |||
8 | 3877047d | Simon Schulz | #HACK for qtcreator ide integration. do not remove! |
9 | file(GLOB_RECURSE HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py) |
||
10 | add_custom_target(python_sources SOURCES ${HEADER_LIST}) |
||
11 | |||
12 | 96a1894b | Simon Schulz | if (PYTHON) |
13 | set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py") |
||
14 | set(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build") |
||
15 | |||
16 | 2114d1d2 | Robert Haschke | add_custom_command(OUTPUT ${OUTPUT} COMMAND ${PYTHON} ARGS ${SETUP_PY} build) |
17 | add_custom_target(install_client ALL DEPENDS ${OUTPUT}) |
||
18 | 96a1894b | Simon Schulz | |
19 | install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX})") |
||
20 | endif() |