Created
February 28, 2018 14:14
-
-
Save simotin13/17f5d8eb1ab065645c0364bfb4b5be63 to your computer and use it in GitHub Desktop.
cmake cross compile sample for raspberry pi.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET(CMAKE_SYSTEM_NAME Linux) | |
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
add_executable(helloworld main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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