Skip to content

Instantly share code, notes, and snippets.

@nebulak
Last active April 12, 2017 07:43
Show Gist options
  • Save nebulak/02067423f7bd8af2e8ab1b79e5678612 to your computer and use it in GitHub Desktop.
Save nebulak/02067423f7bd8af2e8ab1b79e5678612 to your computer and use it in GitHub Desktop.
Cmake Cross compilation

Build instructions

cd build cmake -DCMAKE_TOOLCHAIN_FILE=./../Toolchain-cross-mingw32-linux.cmake ..

Toolchain file

http://www.vtk.org/Wiki/File:Toolchain-cross-mingw32-linux.cmake

CMakeLists.txt

cmake_minimum_required(VERSION 2.8.9)
project (YourProjectName)
link_directories( ./lib/build usr/local/lib)
include_directories( ./lib usr/local/include)
add_executable(YourProjectName main.c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment