Browse Subversion Repository
Contents of /branches/putty_0_76/mingw.toolchain.cmake
Parent Directory
| Revision Log
Revision 9625 -
( show annotations)
( download)
Thu Dec 23 16:34:36 2021 UTC
(2 years, 3 months ago)
by nmaya
File size: 1010 byte(s)
branch for PuTTY 0.76 support
against trunk
| 1 |
# how to build: |
| 2 |
# mkdir build; cd build |
| 3 |
# cmake .. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../mingw.toolchain.cmake |
| 4 |
# cmake --build . |
| 5 |
|
| 6 |
# target |
| 7 |
set(CMAKE_SYSTEM_NAME Windows) |
| 8 |
|
| 9 |
# option |
| 10 |
option(USE_CLANG "use clang compiler" OFF) |
| 11 |
|
| 12 |
# mingw on msys |
| 13 |
#set(CMAKE_SYSROOT /mingw32/i686-w64-mingw32) |
| 14 |
#set(CMAKE_FIND_ROOT_PATH /mingw32/i686-w64-mingw32) |
| 15 |
|
| 16 |
# mingw |
| 17 |
set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) |
| 18 |
#set(CMAKE_SYSROOT /usr/i686-w64-mingw32) |
| 19 |
|
| 20 |
if(USE_CLANG) |
| 21 |
set(CMAKE_C_COMPILER i686-w64-mingw32-clang) |
| 22 |
set(CMAKE_CXX_COMPILER i686-w64-mingw32-clang++) |
| 23 |
else() |
| 24 |
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) |
| 25 |
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) |
| 26 |
endif() |
| 27 |
set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) |
| 28 |
|
| 29 |
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
| 30 |
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
| 31 |
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
| 32 |
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
| 33 |
|
| 34 |
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE} CACHE PATH "toolchain file") |
| 35 |
|
|