Copy BuildUnix-Win32.cmake to Build-Win32.cmake so that builds under MSYS2 will work

This commit is contained in:
SamJakob 2022-12-14 22:10:32 +00:00 committed by GitHub
parent 27344ec08a
commit de77d2afaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
src/Build-Win32.cmake Normal file
View File

@ -0,0 +1,22 @@
################################################################
# 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 "i686-w64-mingw32-gcc")
set (CMAKE_CXX_COMPILER "i686-w64-mingw32-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})