SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_SYSTEM_PROCESSOR x86) # specify the cross compiler SET(CMAKE_C_COMPILER {which:{binaries[c]}}) SET(CMAKE_CXX_COMPILER {which:{binaries[cpp]}}) SET(CMAKE_RC_COMPILER {which:{binaries[windres]}}) SET(CMAKE_AR:FILEPATH {which:{binaries[ar]}}) SET(CMAKE_RANLIB:FILEPATH {which:{binaries[ranlib]}}) # where is the target environment SET(CMAKE_FIND_ROOT_PATH {root_path}) # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # for libraries and headers in the target directories SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)