|
|
1.1 root 1: # This Toolchain file is used to cross compile the windows
2: # version of Hatari under linux using mingw32
3: # use : cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-mingw32.cmake
4:
5: # The name of the target operating system
6: SET(CMAKE_SYSTEM_NAME Windows)
7:
8: # mingw32 versions of the different tools
9: # (change these depending on your system settings)
10: SET(CMAKE_C_COMPILER i586-pc-mingw32-gcc)
11: SET(CMAKE_CXX_COMPILER i586-pc-mingw32-g++)
12: SET(CMAKE_RC_COMPILER i586-pc-mingw32-windres)
13:
14: # Base directory for the target environment
1.1.1.2 ! root 15: # We use the output from '-print-sysroot'
! 16: EXECUTE_PROCESS(
! 17: COMMAND ${CMAKE_C_COMPILER} -print-sysroot
! 18: OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH
! 19: OUTPUT_STRIP_TRAILING_WHITESPACE
! 20: )
! 21: # bin/, include/, lib/ and share/ are often in "mingw/"
! 22: # You might need to adjust the path for your system
! 23: SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/mingw)
! 24:
! 25: # Uncomment this line with your own values if above doesn't work
! 26: #SET(CMAKE_FIND_ROOT_PATH /usr/i586-pc-mingw32/sys-root/mingw )
1.1 root 27:
28: # FindSDL.cmake doesn't search correctly in CMAKE_FIND_ROOT_PATH
29: # so we force SDLDIR here
30: set ( ENV{SDLDIR} ${CMAKE_FIND_ROOT_PATH}/include/SDL )
31:
32: # Adjust the default behaviour of the FIND_XXX() commands:
33: # search headers and libraries in the target environment, search
34: # programs in the host environment
35: set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
36: set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
37: set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
38:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.