Commit cd550c5ba0e99d78535ba309ebcb3c2be60758c6

Authored by Michał Lenart
1 parent 09cbc545

jeszcze kolejne poprawki w zależnościach do pakietu pythonowego

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@196 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing 1 changed file with 11 additions and 5 deletions
morfeusz/python/CMakeLists.txt
... ... @@ -11,6 +11,7 @@ set (PYMORFEUSZ_VERSION "0.1.0")
11 11 INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
12 12 INCLUDE_DIRECTORIES (..)
13 13  
  14 +
14 15 set (SWIG_PYTHON_OUTFILE_CXX "${CMAKE_CURRENT_BINARY_DIR}/swigPYTHON.cpp")
15 16 set (SWIG_PYTHON_OUTFILE_PY "${CMAKE_CURRENT_BINARY_DIR}/morfeusz2.py")
16 17 add_custom_command (
... ... @@ -22,21 +23,26 @@ add_custom_target (generate_python_wrapper ALL
22 23 DEPENDS "${SWIG_PYTHON_OUTFILE_CXX}" "${SWIG_PYTHON_OUTFILE_PY}")
23 24  
24 25 set (SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
  26 +set (SETUP_PY_TMP "${CMAKE_CURRENT_BINARY_DIR}/setupTmp.py")
25 27 set (SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
26 28 set (DEPS "${SWIG_PYTHON_OUTFILE_CXX}" "${SWIG_PYTHON_OUTFILE_PY}")
27 29 set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build")
28 30  
29 31 configure_file (${SETUP_PY_IN} ${SETUP_PY})
30 32  
31   -add_custom_command (OUTPUT ${SETUP_PY}
32   - COMMAND python
33   - ARGS setup.py build
34   - DEPENDS generate_python_wrapper ${SETUP_PY_IN})
35 33 add_custom_target (generate_python_setup_file ALL
36 34 DEPENDS ${SETUP_PY})
37 35  
  36 +add_custom_command (OUTPUT ${OUTPUT}
  37 + COMMAND python
  38 + ARGS ${SETUP_PY} build
  39 + DEPENDS generate_python_wrapper generate_python_setup_file)
  40 +
  41 +add_custom_target (build_python_wrapper ALL
  42 + DEPENDS ${OUTPUT})
  43 +
38 44 add_custom_target (pymorfeusz ALL
39   - DEPENDS generate_python_wrapper generate_python_setup_file libmorfeusz)
  45 + DEPENDS generate_python_wrapper generate_python_setup_file libmorfeusz build_python_wrapper)
40 46  
41 47 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
42 48 add_custom_target (install-python
... ...