mirror of https://github.com/OpenRCT2/OpenRCT2.git
Set CMAKE_FIND_ROOT_PATH, use i686-w64-mingw32
The project now uses the MinGW headers instead of wine's headers.
This commit is contained in:
parent
2bec80b722
commit
ed8db48b40
|
@ -1,20 +1,11 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
if (APPLE)
|
||||
SET(COMPILER_PREFIX i586-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 i686-w64-mingw32-pkg-config)
|
||||
SET(PKG_CONFIG_EXECUTABLE i686-w64-mingw32-pkg-config)
|
||||
else()
|
||||
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)
|
||||
endif (APPLE)
|
||||
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
|
||||
|
@ -22,15 +13,13 @@ endif (APPLE)
|
|||
set(CMAKE_C_FLAGS "-masm=intel -std=gnu99 -fpack-struct=2" 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(${SDL2_INCLUDE_DIRS})
|
||||
|
||||
# here is the target environment located
|
||||
#SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
|
||||
SET(CMAKE_FIND_ROOT_PATH /Users/skip/Downloads/mingw-w32-bin_i686-darwin_20130531/i686-w64-mingw32)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
|
Loading…
Reference in New Issue