From 95e5d976fb2dd40f8d9cf1a8a77b42183a9938de Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Mon, 2 Oct 2023 21:23:53 -0600 Subject: [PATCH] Handle Mingw environment --- CMakeLists.txt | 2 +- ShowMySky/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b539370e..926e5a04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ if(Eigen3_ADDED) endif() include_directories(${CMAKE_BINARY_DIR}) -if(WIN32) +if(WIN32 AND (NOT MINGW)) set(shadersDestPath "${CMAKE_PROJECT_NAME}") set(installBinDir "${CMAKE_PROJECT_NAME}") set(installLibDir "${installBinDir}") diff --git a/ShowMySky/CMakeLists.txt b/ShowMySky/CMakeLists.txt index 0247d87e..1948ab1b 100644 --- a/ShowMySky/CMakeLists.txt +++ b/ShowMySky/CMakeLists.txt @@ -49,7 +49,7 @@ if(${QT_VERSION} STREQUAL 6) endif() set_target_properties(${showmyskyTarget} PROPERTIES OUTPUT_NAME showmysky) -if(WIN32) +if(WIN32 AND (NOT MINGW)) # Default subsystem is console. We don't want the console window to appear, so tweak linker parameters. set_target_properties(${showmyskyTarget} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") endif()