endif()
else()
if(IS_ABSOLUTE "${srcname}")
- file(RELATIVE_PATH srcname "${OPENCV_MODULE_${m}_LOCATION}" "${srcname}")
+ if(srcname MATCHES "/(qrc|moc)_[^/]*\\.cxx$")
+ # QT generated sources
+ file(RELATIVE_PATH srcname "${${m}_BINARY_DIR}" "${srcname}")
+ else()
+ file(RELATIVE_PATH srcname "${OPENCV_MODULE_${m}_LOCATION}" "${srcname}")
+ endif()
endif()
string(REPLACE ".." "__" srcname "${srcname}")
get_filename_component(srcname_we ${srcname} NAME_WE)