0
votes

I have received an SDK that is used to build c++/c applications for an embedded linux device. This is all new to me so some of my terminology may be wrong.

I followed their instructions and the SDK installs on my linux (ubuntu) system in /opt/. The compiler they are using appears to be arm-poky-linux-gnueabi-gcc. Part of their SDK sets some environment variables, like $CC and CPP for compiling C/C++. The environment variables run something like arm-poky-linux-gnueabi-gcc -march=armv7-a (and a bunch of other flags).

My question is: how can I utilize this using cmakelists/cmake? I currently have an entire library and application that is built around cmake.

1

1 Answers

1
votes

The SDK should come with a toolchain file for cmake (for example named toolchain.cmake).

When you first call your cmake, you force it to use the SDK like this: cmake -DCMAKE_TOOLCHAIN_FILE=/opt/???/toolchain.cmake.