From abc6af1629b225aea509d8809c206cb845a29212 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 7 Nov 2024 16:22:26 -0800 Subject: [PATCH] build: add proper search path for Windows The Windows includes are under `win32` at least with the Oracle JDK. This is required to be able to build on Windows. --- Package.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 0ea37b36..fc8e344f 100644 --- a/Package.swift +++ b/Package.swift @@ -35,9 +35,8 @@ let javaIncludePath = "\(javaHome)/include" let javaPlatformIncludePath = "\(javaIncludePath)/linux" #elseif os(macOS) let javaPlatformIncludePath = "\(javaIncludePath)/darwin" -#else - // TODO: Handle windows as well - #error("Currently only macOS and Linux platforms are supported, this may change in the future.") +#elseif os(Windows) + let javaPlatformIncludePath = "\(javaIncludePath)/win32" #endif let package = Package(