scyther/src/BuildUnix-Win32.cmake
Cas Cremers 3df93c42e4 Bugfix: compilation was not working on recent 64-bit Ubuntu versions.
This patch addresses two 64-bit platform compilation issues:
- Force 32-bit mode for gcc using '-m32'
- Recent library modifications broke the 32-bit compilation on 64-bit machines: updated
  'compile.txt' to include the need for the 'gcc-multilib' package.
2014-02-18 10:53:24 +00:00

23 lines
773 B
CMake

################################################################
# Name: BuildUnix-Win32.cmake
# Purpose: Build Win32 binary on Unix
# Author: Cas Cremers
################################################################
message (STATUS "Building W32 version")
# This should work on win32 platform, but also when the compiler
# is available anyway under linux
set (CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
set (CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # to get rid of -rdynamic
# Signal for windows
set (CMAKE_C_FLAGS "-DFORWINDOWS")
# Static where possible (i.e. only not on the APPLE)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -m32")
set (scythername "scyther-w32.exe")
add_executable (${scythername} ${Scyther_sources})