Skip to content

Commit

Permalink
Set CMAKE_GENERATOR manually
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed May 24, 2024
1 parent e3dfb62 commit 465328b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions PreLoad.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
# Need python headers and libraries, but msvc not able to find them
# If inside cygwin or msys.

if (WIN32 AND NOT MSVC)
execute_process(COMMAND uname OUTPUT_VARIABLE uname)
if (uname MATCHES "^MINGW")
set (CMAKE_GENERATOR "MinGW Makefiles" CACHE INTERNAL "" FORCE)
elseif (uname MATCHES "^MSYS")
set (CMAKE_GENERATOR "MSYS Makefiles" CACHE INTERNAL "" FORCE)
else ()
set (CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
endif()
endif()
# Use this for MinGW
# set (CMAKE_GENERATOR "MinGW Makefiles" CACHE INTERNAL "" FORCE)

# Use this for MSYS
# set (CMAKE_GENERATOR "MSYS Makefiles" CACHE INTERNAL "" FORCE)

# Use this otherwise
set (CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)

0 comments on commit 465328b

Please sign in to comment.