diff --git a/Package.swift b/Package.swift index 2e85ebd..db19343 100644 --- a/Package.swift +++ b/Package.swift @@ -22,6 +22,8 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -33,6 +35,8 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -44,6 +48,8 @@ let package = Package( cxxSettings: [ .define("_XOPEN_SOURCE", to: "1", .when(platforms: Arch.OS.apple.platform)), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("TBBPROXY_NO_DLLMAIN") ] ), @@ -59,6 +65,8 @@ let package = Package( .define("_XOPEN_SOURCE", to: "1", .when(platforms: Arch.OS.apple.platform)), .define("__TBBMALLOC_BUILD", to: "1"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("TBBMALLOC_NO_DLLMAIN") ] ), @@ -72,6 +80,8 @@ let package = Package( .define("_XOPEN_SOURCE", to: "1", .when(platforms: Arch.OS.apple.platform)), .define("TBB_ALLOCATOR_TRAITS_BROKEN", to: "1", .when(platforms: Arch.OS.linux.platform)), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("__TBB_BUILD"), .define("__TBB_NO_IMPLICIT_LINKAGE", to: "1", .when(platforms: [.windows])), .define("TBB_NO_LIB_LINKAGE") @@ -90,6 +100,8 @@ let package = Package( .define("_XOPEN_SOURCE", to: "1", .when(platforms: Arch.OS.apple.platform)), .define("TBB_ALLOCATOR_TRAITS_BROKEN", to: "1", .when(platforms: Arch.OS.linux.platform)), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("__TBB_NO_IMPLICIT_LINKAGE", to: "1", .when(platforms: [.windows])), .define("TBB_NO_LIB_LINKAGE"), .define("TBB_USE_PROFILING_TOOLS", to: "2"), @@ -109,6 +121,8 @@ let package = Package( .define("_XOPEN_SOURCE"), .define("TBB_USE_PROFILING_TOOLS", to: "2"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -128,6 +142,8 @@ let package = Package( cSettings: getConfig(for: .lzma2).cSettings, cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -138,6 +154,8 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("yaml_cpp_EXPORTS", .when(platforms: [.windows])) ] ), @@ -154,6 +172,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedLibrary("bz2", .when(platforms: Arch.OS.nix.platform)) @@ -174,6 +194,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -185,6 +207,8 @@ let package = Package( cxxSettings: [ .headerSearchPath("."), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("LIBRAW_BUILDLIB", .when(platforms: [.windows])), ] ), @@ -199,6 +223,8 @@ let package = Package( cSettings: getConfig(for: .png).cSettings, cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -215,6 +241,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -234,6 +262,8 @@ let package = Package( .define("HAVE_JPEGTURBO_DUAL_MODE_8_12", to: "1"), .define("BITS_IN_JSAMPLE", to: "12"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -245,6 +275,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -258,7 +290,9 @@ let package = Package( cxxSettings: [ .headerSearchPath("runtime"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), - // 'RTLD_NEXT' is not symbol on Windows. + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), + // 'RTLD_NEXT' is not a symbol on Windows. .define("RTLD_NEXT", to: "", .when(platforms: [.windows])) ] ), @@ -269,6 +303,8 @@ let package = Package( name: "MicrosoftSTL", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -290,6 +326,8 @@ let package = Package( .define("HAVE_UNISTD_H", to: "1", .when(platforms: Arch.OS.nix.platform)), .define("Z_HAVE_STDARG_H", to: "1"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -315,6 +353,8 @@ let package = Package( .headerSearchPath("."), .headerSearchPath("backends"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedFramework("Cocoa", .when(platforms: [.macOS])), @@ -336,6 +376,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -357,7 +399,9 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("GL_SILENCE_DEPRECATION", to: "1"), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -368,7 +412,9 @@ let package = Package( ], exclude: getConfig(for: .mxGraphEditor).exclude, cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -388,7 +434,9 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .headerSearchPath("include/pystring"), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -415,7 +463,9 @@ let package = Package( publicHeadersPath: "src/Imath", cxxSettings: [ .headerSearchPath("src/python/PyImath"), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedFramework("OpenGL", .when(platforms: [.macOS])), @@ -427,7 +477,9 @@ let package = Package( name: "any", publicHeadersPath: "include", cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -435,7 +487,9 @@ let package = Package( name: "nonstd", publicHeadersPath: "include", cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -443,7 +497,9 @@ let package = Package( name: "rapidjson", publicHeadersPath: "include", cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -460,7 +516,9 @@ let package = Package( path: "Sources/OpenTimelineIO/src/opentime", publicHeadersPath: "include", cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -476,7 +534,9 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .headerSearchPath("include/opentimelineio"), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -491,7 +551,9 @@ let package = Package( .headerSearchPath("."), .headerSearchPath("OpenEXRCore"), .headerSearchPath("include/OpenEXR"), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedLibrary("deflate", .when(platforms: Arch.OS.linux.platform)), @@ -507,7 +569,9 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .headerSearchPath("."), - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: getConfig(for: .oiioUtil).linkerSettings ), @@ -545,6 +609,8 @@ let package = Package( // function, we should fix this in the future. // .define("OIIO_FIX_ABI_FOR_SWIFT", to: "1"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("FMT_LIB_EXPORT"), .define("FMT_HEADER_ONLY") ], @@ -555,7 +621,9 @@ let package = Package( name: "expat", publicHeadersPath: "include", cxxSettings: [ - .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])) + .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -567,6 +635,8 @@ let package = Package( cxxSettings: [ .headerSearchPath("."), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("OpenColorIO_EXPORTS", .when(platforms: [.windows])), ], linkerSettings: [ @@ -584,6 +654,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -619,6 +691,8 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("PTEX_EXPORTS", .when(platforms: [.windows])), .define("PTEX_PLATFORM_WINDOWS", .when(platforms: [.windows])), ] @@ -640,6 +714,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -656,6 +732,8 @@ let package = Package( cxxSettings: [ .headerSearchPath("include/Alembic/AbcMaterial"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] ), @@ -667,6 +745,8 @@ let package = Package( publicHeadersPath: "include", cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedLibrary("python3.10", .when(platforms: Arch.OS.linux.platform)), @@ -684,6 +764,8 @@ let package = Package( cSettings: [ .headerSearchPath("include"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], linkerSettings: [ .linkedLibrary("pthread", .when(platforms: Arch.OS.linux.platform)), @@ -716,6 +798,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -746,6 +830,8 @@ let package = Package( ], cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -757,6 +843,8 @@ let package = Package( dependencies: getConfig(for: .all).dependencies, cxxSettings: [ .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ], swiftSettings: [ .interoperabilityMode(.Cxx), @@ -994,6 +1082,8 @@ func getConfig(for target: PkgTarget) -> TargetInfo .define("_GLFW_WIN32", to: "1", .when(platforms: Arch.OS.windows.platform)), .define("GL_SILENCE_DEPRECATION", to: "1"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] #if os(Windows) config.linkerSettings = [ @@ -1115,6 +1205,8 @@ func getConfig(for target: PkgTarget) -> TargetInfo config.cxxSettings = [ .headerSearchPath("glLoader"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), ] case .exr: break @@ -1199,6 +1291,8 @@ func getConfig(for target: PkgTarget) -> TargetInfo .define("OPENVDB_USE_BLOSC", to: "1"), .define("OPENVDB_USE_ZLIB", to: "1"), .define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])), + .define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])), + .define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])), .define("OPENVDB_PRIVATE") ] #if os(Linux) || os(OpenBSD) || os(FreeBSD)