mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2025-09-05 16:00:15 +02:00
Mingw cross compilation (#24)
* Fixed icon filename capitalization * Created mingw cmake toolchain * Adjusted CMakeLists.txt for compatibility * Small mingwcc.cmake cleanup * Added cross-compilation instructions to readme * Update README.md Fixed typo Co-authored-by: Nicola Orlando <nicolaorlando24@gmail.com> Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
This commit is contained in:
parent
48721e5811
commit
87e44b700b
4 changed files with 38 additions and 6 deletions
25
mingwcc.cmake
Normal file
25
mingwcc.cmake
Normal file
|
@ -0,0 +1,25 @@
|
|||
set(TOOLCHAIN_PREFIX "x86_64-w64-mingw32")
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_PREFIX}-g++")
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_PREFIX}-gcc")
|
||||
set(CMAKE_OBJCOPY "${TOOLCHAIN_PREFIX}-objcopy")
|
||||
set(CMAKE_STRIP "${TOOLCHAIN_PREFIX}-strip")
|
||||
set(CMAKE_SIZE "${TOOLCHAIN_PREFIX}-size")
|
||||
set(CMAKE_AR "${TOOLCHAIN_PREFIX}-ar")
|
||||
set(ASSEMBLER "${TOOLCHAIN_PREFIX}-as")
|
||||
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# adjust the default behavior of the find commands:
|
||||
# search headers and libraries in the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
|
||||
# search programs in the host environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# Add the path to your toolchain version of SDL2
|
||||
set(SDL2_PATH /usr/${TOOLCHAIN_PREFIX})
|
Loading…
Add table
Add a link
Reference in a new issue