Skip to content

Commit

Permalink
Support versions before swift 6 on windows.
Browse files Browse the repository at this point in the history
Signed-off-by: furby™ <[email protected]>
  • Loading branch information
furby-tm committed Oct 29, 2024
1 parent 5cc550e commit e8a8bab
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ let package = Package(
],
publicHeadersPath: ".",
cxxSettings: [
.define("IMGUI_ENABLE_FREETYPE", to: "1")
.define("IMGUI_ENABLE_FREETYPE", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

Expand All @@ -68,6 +69,7 @@ let package = Package(
.define("_GLFW_X11", to: "1", .when(platforms: [.linux, .android, .openbsd])),
.define("_GLFW_WIN32", to: "1", .when(platforms: [.windows])),
.define("GL_SILENCE_DEPRECATION", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
.unsafeFlags(["-fno-objc-arc"]), // TODO: remove.
],
linkerSettings: [
Expand Down Expand Up @@ -252,7 +254,8 @@ let package = Package(
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("src"),
.define("FT_USE_AUTOFIT", to: "1")
.define("FT_USE_AUTOFIT", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

Expand All @@ -266,7 +269,10 @@ let package = Package(
sources: [
"imgui_impl_glfw.cpp"
],
publicHeadersPath: "."
publicHeadersPath: ".",
cxxSettings: [
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
Expand All @@ -284,7 +290,8 @@ let package = Package(
],
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("misc/freetype")
.headerSearchPath("misc/freetype"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

Expand All @@ -296,6 +303,7 @@ let package = Package(
],
cxxSettings: [
.define("IMGUI_ENABLE_FREETYPE", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
],
swiftSettings: [
.interoperabilityMode(.Cxx)
Expand All @@ -307,6 +315,7 @@ let package = Package(
dependencies: ["ImGui"],
cxxSettings: [
.define("IMGUI_ENABLE_FREETYPE", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
],
swiftSettings: [
.interoperabilityMode(.Cxx)
Expand Down

0 comments on commit e8a8bab

Please sign in to comment.