Maybe you can do something with the ‘HINTS’ option to find_package()? https://cmake.org/cmake/help/v3.4/command/find_package.html
Sincerely, Jakob > On 17 Dec 2015, at 18:03, Hauke Krüger <krue...@ind.rwth-aachen.de> wrote: > > Hi everybody, > > I have a project which builds to realize a Qt5 application. I use the > latest CMAKE Qt5 mechanisms such as AUTOMOC etc with good success. > > The project builds on Raspberry Pi if cmake is run on the Raspberry Pi > itself since all Qt tools are available and run also on the Raspberry Pi. > > Lately, I wanted to compile this project in a cross compile approach. > For this purpose, I mount the Raspberry Pi file system to be part of the > directory tree on my host Linux PC. > Of course, I use find_package to locate the Qt5 package in the directory > branch related to the Raspberry Pi. The corresponding > moc, uic and rcc tools have been built for arm. Therefore, I can not > run the moc from the location as reported by find_package in the cross > build approach. > > So, here is my question: How can I overwrite the moc-executable (and uic > etc) path to use another moc version than the one found by the > find_package mechanism? If I use the moc which is part of my Linux host > PC rather than the arm compiled moc in the Raspberry file system, the > code generation should be fine, and afterwards, I will link against the > Raspberry Pi Qt5 libraries. > > Thank you for any help and best regards > > Hauke > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake