Line | |
---|
1 | # An example of how the cross compiler for mingw could look like |
---|
2 | # Assuming you are ona Unix platform and want to build for Windows. |
---|
3 | # You need to modify this with your own paths/binary names... |
---|
4 | |
---|
5 | # the name of the target operating system |
---|
6 | SET(CMAKE_SYSTEM_NAME Windows) |
---|
7 | |
---|
8 | # which compilers to use for C and C++ |
---|
9 | SET(CMAKE_C_COMPILER i486-mingw32-gcc) |
---|
10 | SET(CMAKE_CXX_COMPILER i486-mingw32-g++) |
---|
11 | SET(CMAKE_Fortran_COMPILER i486-mingw32-gfortran) |
---|
12 | SET(CMAKE_RC_COMPILER i486-mingw32-windres) |
---|
13 | |
---|
14 | # here is the target environment located |
---|
15 | SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32) |
---|
16 | |
---|
17 | # adjust the default behaviour of the FIND_XXX() commands: |
---|
18 | # search headers and libraries in the target environment, search |
---|
19 | # programs in the host environment |
---|
20 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
---|
21 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
---|
22 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
---|
23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.