hlrc / client / python / CMakeLists.txt @ 54cb7fdf
History | View | Annotate | Download (856 Bytes)
1 |
### 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 |
|
7 |
find_program(PYTHON "python") |
8 |
|
9 |
#HACK for qtcreator ide integration. do not remove! |
10 |
file(GLOB_RECURSE HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py) |
11 |
add_custom_target(python_sources SOURCES ${HEADER_LIST}) |
12 |
|
13 |
if (PYTHON) |
14 |
set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py") |
15 |
set(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build") |
16 |
|
17 |
add_custom_command(OUTPUT ${OUTPUT} |
18 |
COMMAND ${PYTHON} |
19 |
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build |
20 |
) |
21 |
|
22 |
add_custom_target(target ALL DEPENDS ${OUTPUT}) |
23 |
|
24 |
install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX})") |
25 |
endif() |
26 |
|
27 |
|