Skip to content

Instantly share code, notes, and snippets.

@VioletGiraffe
Created October 23, 2019 20:35
Show Gist options
  • Save VioletGiraffe/584e27074d22f67f87a5f0a4fe7bcd50 to your computer and use it in GitHub Desktop.
Save VioletGiraffe/584e27074d22f67f87a5f0a4fe7bcd50 to your computer and use it in GitHub Desktop.
include(CMakeForceCompiler)
# this one is important
set(CMAKE_SYSTEM_NAME Generic)
# specify the cross compiler
SET(CMAKE_C_COMPILER "D:/Downloads/djgpp/bin/i586-pc-msdosdjgpp-gcc.exe")
SET(CMAKE_CXX_COMPILER "D:/Downloads/djgpp/bin/i586-pc-msdosdjgpp-g++.exe")
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH "D:/Downloads/djgpp/")
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_MAKE_PROGRAM "D:/Downloads/djgpp/ninja.exe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment