Skip to content

Instantly share code, notes, and snippets.

@simotin13
Created February 28, 2018 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simotin13/17f5d8eb1ab065645c0364bfb4b5be63 to your computer and use it in GitHub Desktop.
Save simotin13/17f5d8eb1ab065645c0364bfb4b5be63 to your computer and use it in GitHub Desktop.
cmake cross compile sample for raspberry pi.
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
cmake_minimum_required(VERSION 2.8)
add_executable(helloworld main.c)
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment