# the name of the target operating system
set(CMAKE_SYSTEM_NAME Linux)
# which C and C++ compiler to use
set (CMAKE_C_COMPILER /home/alex/eldk-mips/usr/bin/mips_4KC-gcc)
set (CMAKE_CXX_COMPILER
/home/alex/eldk-mips/usr/bin/mips_4KC-g++)
# location of the target environment
set (CMAKE_FIND_ROOT_PATH /home/alex/eldk-mips/mips_4KC
/home/alex/eldk-mips-extra-install )
# adjust the default behavior of the FIND_XXX() commands:
# search for headers and libraries in the target environment,
# search for programs in the host environment
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
?
project (Hello)
add_executable(Hello Hello.c)
mkdir Hello-eldk-mips
cd Hello-eldk-mips
cmake -DCMAKE_TOOLCHAIN_FILE= ~/Toolchains/Toolchain-eldk-mips4k.cmake ..
make VERBOSE=1
?
|