mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
add cmake toolchain file for use on arch linux
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
253fb241f0
commit
ace4c699b0
1 changed files with 23 additions and 0 deletions
23
cmake/archlinux-mingw.cmake
Normal file
23
cmake/archlinux-mingw.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
# use like this: cmake . -DCMAKE_TOOLCHAIN_FILE=cmake/archlinux-mingw.cmake
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "(x86_64|amd64)")
|
||||
set(mingwtriplet "x86_64-w64-mingw32")
|
||||
else()
|
||||
set(mingwtriplet "i686-w64-mingw32")
|
||||
endif()
|
||||
|
||||
# which compilers to use for C and C++
|
||||
set(CMAKE_C_COMPILER ${mingwtriplet}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${mingwtriplet}-g++)
|
||||
set(CMAKE_RC_COMPILER ${mingwtriplet}-windres)
|
||||
|
||||
# here is the target environment located
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${mingwtriplet})
|
||||
|
||||
# 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)
|
Loading…
Add table
Reference in a new issue