mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
SET(CMAKE_SYSTEM_NAME Windows)
|
|
|
|
SET(COMPILER_PREFIX i686-w64-mingw32)
|
|
SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
|
SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-c++)
|
|
SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
|
|
SET(CMAKE_PKGCONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
|
SET(PKG_CONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
|
|
|
# potential flags to make code more similar to MSVC:
|
|
# -fshort-wchar -fshort-enums -mms-bitfields -fpack-struct=1
|
|
#
|
|
set(CMAKE_C_FLAGS "-masm=intel -std=gnu99" CACHE STRING "" FORCE)
|
|
set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc" CACHE STRING "" FORCE)
|
|
|
|
include_directories("/usr/include/wine/windows/")
|
|
|
|
# find and include SDL2
|
|
# INCLUDE(FindPkgConfig)
|
|
# PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
|
|
INCLUDE_DIRECTORIES("/usr/include")
|
|
INCLUDE_DIRECTORIES("/usr/include/sdl2")
|
|
|
|
# here is the target environment located
|
|
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
|
|
|
|
# adjust the default behaviour of the FIND_XXX() commands:
|
|
# search headers and libraries in the target environment, search
|
|
# programs in the host environment
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|