|
|
1.1 ! root 1: # This Toolchain file is used to cross compile the Windows 32 bit ! 2: # version of Hatari under linux using mingw32 ! 3: # use : cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-mingw32-win64_32.cmake ! 4: ! 5: ! 6: # mingw32 versions of the different tools ! 7: # (change these depending on your system settings) ! 8: set (MINGW_EXE_PREFIX "i686-w64-mingw32") ! 9: set (MINGW_ROOT_PATH "mingw") ! 10: ! 11: ! 12: #-- Changes should not be required below this point ! 13: ! 14: # The name of the target operating system ! 15: SET(CMAKE_SYSTEM_NAME Windows) ! 16: ! 17: # Use the value provided to set mingw's tools ! 18: SET(CMAKE_C_COMPILER ${MINGW_EXE_PREFIX}-gcc) ! 19: SET(CMAKE_CXX_COMPILER ${MINGW_EXE_PREFIX}-g++) ! 20: SET(CMAKE_RC_COMPILER ${MINGW_EXE_PREFIX}-windres) ! 21: ! 22: # Base directory for the target environment ! 23: # We use the output from '-print-sysroot' ! 24: EXECUTE_PROCESS( ! 25: COMMAND ${CMAKE_C_COMPILER} -print-sysroot ! 26: OUTPUT_VARIABLE CMAKE_FIND_ROOT_PATH ! 27: OUTPUT_STRIP_TRAILING_WHITESPACE ! 28: ) ! 29: # bin/, include/, lib/ and share/ are often in "mingw/" ! 30: # You might need to adjust the path for your system ! 31: SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}/${MINGW_ROOT_PATH}) ! 32: ! 33: # Make the path absolute, a relative path could confuse some systems ! 34: get_filename_component ( CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ABSOLUTE ) ! 35: ! 36: #message ( "MINGW_ROOT_PATH ${MINGW_ROOT_PATH} MINGW_EXE_PREFIX ${MINGW_EXE_PREFIX} CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}" ) ! 37: ! 38: # FindSDL.cmake doesn't search correctly in CMAKE_FIND_ROOT_PATH ! 39: # so we force SDLDIR here ! 40: set ( ENV{SDLDIR} ${CMAKE_FIND_ROOT_PATH}/include/SDL ) ! 41: ! 42: # Adjust the default behaviour of the FIND_XXX() commands: ! 43: # search headers and libraries in the target environment, search ! 44: # programs in the host environment ! 45: set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) ! 46: set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) ! 47: set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ! 48:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.