aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindPyKDE4.cmake12
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})