diff options
author | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-10-02 22:58:18 +0000 |
---|---|---|
committer | rikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-10-02 22:58:18 +0000 |
commit | 76d765783b4fa018fff7dba93639a76ca9be1a3e (patch) | |
tree | 4e8d0986a5431a2c315dfc9e78653dbe1bdc241b /cmake | |
parent | 7aa1319c9325a303e321b55c2f300a89570d5359 (diff) | |
download | navit-76d765783b4fa018fff7dba93639a76ca9be1a3e.tar.gz |
Add:core:Added mingw32 crosscompiling support to cmake build toolchain.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3591 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/toolchain-mingw32.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/toolchain-mingw32.cmake b/cmake/toolchain-mingw32.cmake new file mode 100644 index 000000000..b884771ce --- /dev/null +++ b/cmake/toolchain-mingw32.cmake @@ -0,0 +1,16 @@ +SET(CMAKE_SYSTEM_NAME Windows) + +FIND_PROGRAM(CMAKE_C_COMPILER NAMES i686-mingw32-gcc i586-mingw32-gcc mingw32-gcc) +FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES i686-mingw32-g++ i586-mingw32-gcc mingw32-g++) + +EXECUTE_PROCESS( + COMMAND ${CMAKE_C_COMPILER} -print-sysroot + OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH +) + +# Does not work - don't know why +SET(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_FIND_ROOT_PATH}) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |