Re: [hatari-devel] cmake and cross-compiling

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Sun, Dec 30, 2012 at 12:51 PM, Nicolas Pomarède
<npomarede@xxxxxxxxxxxx> wrote:
> Unless someone comes with some code to do it in cmake, I will leave it as it
> for now since anyway you need to adjust a part of the path.
>

I'm no cmake guru. I tried, but there are some concepts that I truly
don't understand.
It would be nice to get CMAKE_FIND_ROOT_PATH to be dynamic, and static.

I tried something like this (It don't work!)
EXECUTE_PROCESS (
 COMMAND ${CMAKE_C_COMPILER} -print-sysroot
 OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH
)

SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/mingw)

The problem is that CMAKE_FIND_ROOT_PATH becomes:
/path/to/sysroot
/mingw

I want it to be /path/to/sysroot/mingw.


-- 
chs,



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/