Re: [hatari-devel] cmake and cross-compiling |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On 30/12/2012 16:25, Christer Solskogen wrote:
The problem is that CMAKE_FIND_ROOT_PATH becomes:
/path/to/sysroot
/mingw
I want it to be /path/to/sysroot/mingw.
you need to do :
EXECUTE_PROCESS(
COMMAND ${CMAKE_C_COMPILER} -print-sysroot
OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
But it doesn't solve the "/mingw" part to add or not to the path.
I added this to the current sources tree, at least for people using
"/mingw" it will remove the need to edit cmake/Toolchain-mingw32.cmake
to change "/usr/i586-pc-mingw32/sys-root"
Nicolas