blob: 098c2e01082ff0552e23f78e60abca8613153382 [file] [log] [blame]
if(NOT DEFINED SDL2_DIR)
set(SDL2_DIR /opt/local/x86_64-w64-mingw32/lib/cmake/SDL2)
endif()
set(SDL2_PREFIX ${SDL2_DIR}/../../..)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
set(CMAKE_OBJCOPY x86_64-w64-mingw32-objcopy CACHE PATH "Path to objcopy")
set(CMAKE_LINKER x86_64-w64-mingw32-ld CACHE PATH "Path to linker")
set(CMAKE_CXX_FLAGS_INIT "-static-libstdc++ -static-libgcc -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic")
if(EXISTS "${SDL2_PREFIX}/bin/SDL2.dll")
set(SDL2_DLL "${SDL2_PREFIX}/bin/SDL2.dll")
endif()