From 5a41c6509e5637dc2ccbde093beab91664f05068 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Wed, 6 Jun 2012 13:24:41 +0000 Subject: [PATCH] Fixed build of opencv_world with QT on linux #2012 --- modules/world/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/world/CMakeLists.txt b/modules/world/CMakeLists.txt index fa44488b2e..9d626e8fe8 100644 --- a/modules/world/CMakeLists.txt +++ b/modules/world/CMakeLists.txt @@ -52,7 +52,12 @@ foreach(m ${OPENCV_MODULE_${the_module}_DEPS}) 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)