diff options
author | Laurent Montel <montel@kde.org> | 2008-10-21 06:39:09 +0000 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2008-10-21 06:39:09 +0000 |
commit | dc691a93575f3ab9151048afec53d3cad907d317 (patch) | |
tree | fb38d87da36d61f041c31ed9483e1c57b7b7684b | |
parent | fa783146c78a1b52b1c95eba9cd9e2d37f021b50 (diff) | |
download | extra-cmake-modules-dc691a93575f3ab9151048afec53d3cad907d317.tar.gz extra-cmake-modules-dc691a93575f3ab9151048afec53d3cad907d317.tar.bz2 |
Use get_filename_component to find cmake path
svn path=/trunk/KDE/kdelibs/; revision=874279
-rw-r--r-- | modules/FindPyKDE4.cmake | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/FindPyKDE4.cmake b/modules/FindPyKDE4.cmake index 7dc592db..a3654054 100644 --- a/modules/FindPyKDE4.cmake +++ b/modules/FindPyKDE4.cmake @@ -11,8 +11,10 @@ INCLUDE(FindPythonInterp) SET(PYKDE4_FOUND FALSE) +get_filename_component( current_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH) + IF(PYTHONINTERP_FOUND) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${DATA_INSTALL_DIR}/cmake/modules/FindPyKDE4.py OUTPUT_VARIABLE pykde_config) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/FindPyKDE4.py OUTPUT_VARIABLE pykde_config) IF(NOT pykde_config) # Failure to run SET(PYKDE4_FOUND FALSE) @@ -125,16 +127,16 @@ MACRO(PYKDE4_INSTALL_PYTHON_FILES) IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. ADD_CUSTOM_COMMAND( TARGET pysupport - COMMAND ${CMAKE_COMMAND} ${_message} -P ${CMAKE_SOURCE_DIR}/cmake/modules/print_status.cmake - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/modules/PythonCompile.py ${_bin_py} + COMMAND ${CMAKE_COMMAND} ${_message} -P ${current_module_dir}/print_status.cmake + COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} DEPENDS ${_absfilename} ) ELSE(_abs_bin_py STREQUAL ${_absfilename}) ADD_CUSTOM_COMMAND( TARGET pysupport - COMMAND ${CMAKE_COMMAND} ${_message} -P ${CMAKE_SOURCE_DIR}/cmake/modules/print_status.cmake + COMMAND ${CMAKE_COMMAND} ${_message} -P ${current_module_dir}/print_status.cmake COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/modules/PythonCompile.py ${_bin_py} + COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} DEPENDS ${_absfilename} ) ENDIF(_abs_bin_py STREQUAL ${_absfilename}) |