| OLD | NEW |
| 1 # Cross-compiling requires CMake 2.6 or newer. To cross-compile, first modify | 1 # Cross-compiling requires CMake 2.6 or newer. To cross-compile, first modify |
| 2 # this file to set the proper settings and paths. Then use it from build/ like: | 2 # this file to set the proper settings and paths. Then use it from build/ like: |
| 3 # cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt \ | 3 # cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt \ |
| 4 # -DCMAKE_INSTALL_PREFIX=/usr/mingw32/mingw | 4 # -DCMAKE_INSTALL_PREFIX=/usr/mingw32/mingw |
| 5 # If you already have a toolchain file setup, you may use that instead of this | 5 # If you already have a toolchain file setup, you may use that instead of this |
| 6 # file. | 6 # file. |
| 7 | 7 |
| 8 SET(NACL 1) |
| 9 |
| 8 # the name of the target operating system | 10 # the name of the target operating system |
| 9 SET(CMAKE_SYSTEM_NAME Linux) | 11 SET(CMAKE_SYSTEM_NAME Linux) |
| 10 | 12 |
| 11 # which compilers to use for C and C++ | 13 # which compilers to use for C and C++ |
| 12 SET(CMAKE_C_COMPILER "${NACLCC}") | 14 SET(CMAKE_C_COMPILER "${NACLCC}") |
| 13 SET(CMAKE_CXX_COMPILER "${NACLCXX}") | 15 SET(CMAKE_CXX_COMPILER "${NACLCXX}") |
| 14 SET(CMAKE_LINKER "${NACLLD}") | 16 SET(CMAKE_LINKER "${NACLLD}") |
| 15 SET(CMAKE_AR "${NACLAR}" CACHE FILEPATH "Archiver") | 17 SET(CMAKE_AR "${NACLAR}" CACHE FILEPATH "Archiver") |
| 16 SET(_CMAKE_TOOLCHAIN_PREFIX ${NACL_CROSS_PREFIX}) | 18 SET(_CMAKE_TOOLCHAIN_PREFIX ${NACL_CROSS_PREFIX}) |
| 17 | 19 |
| 18 # here is the target environment located | 20 # here is the target environment located |
| 19 SET(CMAKE_FIND_ROOT_PATH ${NACL_TOOLCHAIN_ROOT}) | 21 SET(CMAKE_FIND_ROOT_PATH ${NACL_TOOLCHAIN_ROOT}) |
| 20 | 22 |
| 21 # adjust the default behaviour of the FIND_XXX() commands: | 23 # adjust the default behaviour of the FIND_XXX() commands: |
| 22 # search headers and libraries in the target environment, search | 24 # search headers and libraries in the target environment, search |
| 23 # programs in the host environment | 25 # programs in the host environment |
| 24 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | 26 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
| 25 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | 27 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
| 26 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | 28 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
| 27 SET(CMAKE_REQUIRED_INCLUDES "${NACL_SDK_ROOT}/include") | 29 SET(CMAKE_REQUIRED_INCLUDES "${NACL_SDK_ROOT}/include") |
| 28 INCLUDE_DIRECTORIES(${NACL_SDK_ROOT}/include) | 30 INCLUDE_DIRECTORIES(${NACL_SDK_ROOT}/include) |
| 29 INCLUDE_DIRECTORIES(${EXTRA_INCLUDE}) | 31 INCLUDE_DIRECTORIES(${EXTRA_INCLUDE}) |
| 30 | 32 |
| 31 # nacl abi says 32bits little endian | 33 # nacl abi says 32bits little endian |
| 32 SET(CMAKE_SIZEOF_VOID_P 4) | 34 SET(CMAKE_SIZEOF_VOID_P 4) |
| OLD | NEW |