From dac31a70a725a535fb6674d4a5fcb404a98b13ee Mon Sep 17 00:00:00 2001
From: Stephen Hurd <deuce@synchro.net>
Date: Sat, 26 Feb 2022 01:15:03 -0500
Subject: [PATCH] Fix forced include for MSVC compilers

---
 CMakeLists.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0376cca..b1500fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,9 @@
 cmake_minimum_required(VERSION 3.11)
 project (XPDevPlus CXX)
-include("FetchContent")
-
-include(ExternalProject)
 enable_language(C)
 
+include("FetchContent")
+
 if(MSVC)
 	add_compile_options("/FI${XPDevPlus_BINARY_DIR}/xpdevplus.h")
 else()
@@ -66,4 +65,8 @@ configure_file(xpdevplus.h.in xpdevplus.h)
 add_library(xpdevplus STATIC ${SOURCE})
 target_link_libraries(xpdevplus ciolib comio encode hash uifc xpdev)
 target_include_directories(xpdevplus PUBLIC ${XPDevPlus_BINARY_DIR})
-target_compile_options(xpdevplus PUBLIC "SHELL:-include xpdevplus.h")
+if(MSVC)
+	target_compile_options(xpdevplus PUBLIC "/FI${XPDevPlus_BINARY_DIR}/xpdevplus.h")
+else()
+	target_compile_options(xpdevplus PUBLIC "SHELL:-include xpdevplus.h")
+endif()
-- 
GitLab