Win64Toolchain: added 32 bit compiler configuration

It might be desirable to compile single modules with a 32 bit compiler.
Added according CMake variables so they can be used easily.
This commit is contained in:
Tobias Doerffel
2010-12-23 21:55:26 +01:00
parent c974797954
commit 394f7ea433
2 changed files with 9 additions and 0 deletions

View File

@@ -13,6 +13,13 @@ SET(MINGW_TOOL_PREFIX ${MINGW_PREFIX}/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32
SET(CMAKE_C_COMPILER ${MINGW_TOOL_PREFIX}gcc)
SET(CMAKE_CXX_COMPILER ${MINGW_TOOL_PREFIX}g++)
IF(WIN64)
# specify the cross compiler
SET(MINGW_TOOL_PREFIX32 ${MINGW_PREFIX32}/bin/${CMAKE_SYSTEM_PROCESSOR32}-w64-mingw32-)
SET(CMAKE_C_COMPILER32 ${MINGW_TOOL_PREFIX32}gcc)
SET(CMAKE_CXX_COMPILER32 ${MINGW_TOOL_PREFIX32}g++)
ENDIF()
# specify location of some tools
SET(STRIP ${MINGW_TOOL_PREFIX}strip)
SET(WINDRES ${MINGW_TOOL_PREFIX}windres)

View File

@@ -1,6 +1,8 @@
SET(MINGW_PREFIX /opt/mingw64)
SET(MINGW_PREFIX32 /opt/mingw32)
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
SET(CMAKE_SYSTEM_PROCESSOR32 i686)
SET(WIN64 TRUE)