On 07/30/2015 09:29 AM, Pascal Bach wrote:
> CMAKE_FIND_ROOT_PATH_MODE would then need to be extended to support
> something like NATIVE and TARGET that one could use to choose where
> to look for files.
> This way every find_* call could explicitly tell if it wants a host
> or a target version.

Are you proposing new keyword arguments to find_* commands to specify
this?  The problem is that find modules don't necessarily know which
kind of binary the application wants.  That is why we have the
CMAKE_FIND_ROOT_PATH_MODE_<type> variables.

The existing CMAKE_FIND_ROOT_PATH* and CMAKE_SYSROOT options have been
sufficient for most packages for a long time.  We regularly get
complaints that FindPythonLibs does not ask the python executable
where to get its libraries, and our answer every time is that it is
wrong to do that for cross compiling.  FindQt4 is making that mistake,
and that is the cause of these troubles.

FindQt4 should be taught not to ask qmake for anything when cross
compiling.

-Brad

-- 

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-developers

Reply via email to