From 50dee8c9bd6d8b81f2cf7c119ab68ab6f5389758 Mon Sep 17 00:00:00 2001 From: Stephen Hurd <deuce@synchro.net> Date: Fri, 25 Feb 2022 02:45:37 -0500 Subject: [PATCH] Use /FI, not -include for MSVC --- CMakeLists.txt | 6 +++++- xpdevplus.h.in | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c27304e..6c3b272 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,11 @@ include("FetchContent") include(ExternalProject) -add_compile_options("SHELL:-include xpdevplus.h") +if(MSVC) + add_compile_options("SHELL:/FI xpdevplus.h") +else() + add_compile_options("SHELL:-include xpdevplus.h") +endif() FetchContent_Declare( CONIO diff --git a/xpdevplus.h.in b/xpdevplus.h.in index 6875c67..1241b35 100644 --- a/xpdevplus.h.in +++ b/xpdevplus.h.in @@ -7,5 +7,6 @@ #cmakedefine HAS_STDINT_H #cmakedefine LINK_LIST_THREADSAFE #define DISABLE_MKSTEMP_DEFINE +#define BUILD_WITH_MINGW_COMPAT #endif -- GitLab