Skip to content

Instantly share code, notes, and snippets.

@kmatt
Created March 1, 2024 01:42
Show Gist options
  • Save kmatt/d096dca5bc7bcf7657c4629473611806 to your computer and use it in GitHub Desktop.
Save kmatt/d096dca5bc7bcf7657c4629473611806 to your computer and use it in GitHub Desktop.
TDM-GCC and cmake on Windows notes
# To configure for MinGW instead of nmake
#
# C:\TDM-GCC-64\mingwvars.bat
# cmake . -G "MinGw Makefiles"
#
# Makefile: cmake ... -DCMAKE_TOOLCHAIN_FILE=TDM.cmake
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER C:/TDM-GCC-64/bin/gcc.exe)
set(CMAKE_CXX_COMPILER C:/TDM-GCC-64/bin/g++.exe)
set(CMAKE_GENERATOR MinGW Makefiles)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment