From 465328b03dcff064651c35f04b816ddd49beee71 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 24 May 2024 09:45:52 +0800 Subject: [PATCH] Set CMAKE_GENERATOR manually --- PreLoad.cmake | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/PreLoad.cmake b/PreLoad.cmake index 88876c0..fb85b0c 100644 --- a/PreLoad.cmake +++ b/PreLoad.cmake @@ -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() \ No newline at end of file +# 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) \ No newline at end of file