Changeset View
Changeset View
Standalone View
Standalone View
cmake-modules/KDEPython.cmake
Context not available. | |||||
36 | get_filename_component(_filename ${SOURCE_FILE} NAME) | 36 | get_filename_component(_filename ${SOURCE_FILE} NAME) | ||
---|---|---|---|---|---|
37 | get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE) | 37 | get_filename_component(_filenamebase ${SOURCE_FILE} NAME_WE) | ||
38 | get_filename_component(_basepath ${SOURCE_FILE} PATH) | 38 | get_filename_component(_basepath ${SOURCE_FILE} PATH) | ||
39 | file(RELATIVE_PATH _relativefilename ${CMAKE_SOURCE_DIR} ${_absfilename}) | ||||
39 | 40 | | |||
40 | set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) | 41 | set(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) | ||
41 | 42 | | |||
Context not available. | |||||
47 | # Setting because it will be displayed later, in compile_python_files | 48 | # Setting because it will be displayed later, in compile_python_files | ||
48 | set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}") | 49 | set(_message "Byte-compiling ${_bin_py} to ${_bin_pyc}") | ||
49 | 50 | | |||
50 | string(REPLACE "/" "_" _rule_name "${_basepath}/${_bin_pyc}") | 51 | string(REPLACE "/" "_" _rule_name "${_relativefilename}_rule") | ||
52 | string(REPLACE " " "_" _rule_name "${_rule_name}") | ||||
51 | add_custom_target("${_rule_name}" ALL) | 53 | add_custom_target("${_rule_name}" ALL) | ||
52 | 54 | | |||
53 | get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE) | 55 | get_filename_component(_abs_bin_py ${_bin_py} ABSOLUTE) | ||
Context not available. |