# # CMake Toolchain file for crosscompiling on ARM. # # This can be used when running cmake in the following way: # cd build/ # cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-gnueabihf.cmake # set(CROSS_PATH /opt/STLinux-2.4/devkit/armv5) # Target operating system name. set(CMAKE_SYSTEM_NAME Linux) # Name of C compiler. set(CMAKE_C_COMPILER "${CROSS_PATH}/bin/armv5-linux-gcc") set(CMAKE_CXX_COMPILER "${CROSS_PATH}/bin/armv5-linux-g++") # Where to look for the target environment. (More paths can be added here) set(CMAKE_FIND_ROOT_PATH "${CROSS_PATH}") SET(ZLIB_INCLUDE_DIR ${CROSS_PATH}/target/usr/include) SET(ZLIB_LIBRARY ${CROSS_PATH}/target/usr/lib/libz.so) SET(OPENSSL_ROOT_DIR ../openssl-0.9.8h/release) SET(OPENSSL_LIBRARIES ../openssl-0.9.8h/release/lib) SET(OPENSSL_INCLUDE_DIR ../openssl-0.9.8h/release/openssl) SET(OPENSSL_CRYPTO_LIBRARY ${CROSS_PATH}/target/usr/lib/libcrypto.so) SET(OPENSSL_SSL_LIBRARY ${CROSS_PATH}/target/usr/lib/libssl.so) # Adjust the default behavior of the FIND_XXX() commands: # search programs in the host environment only. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Search headers and libraries in the target environment only. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)