diff --git a/Sources/SwiftyExpat/Expat.swift b/Sources/SwiftyExpat/Expat.swift index d6bb3f8..9317ffc 100644 --- a/Sources/SwiftyExpat/Expat.swift +++ b/Sources/SwiftyExpat/Expat.swift @@ -3,9 +3,14 @@ // SwiftyExpat // // Created by Helge Heß on 7/15/14. -// Copyright (c) 2014 Always Right Institute. All rights reserved. +// Copyright (c) 2014-2018 Always Right Institute. All rights reserved. // +#if Xcode // wasn't there an SPM flag? +#else + import Expat +#endif + /** * Simple wrapper for the Expat parser. Though the block based Expat is * reasonably easy to use as-is. diff --git a/SwiftyExpat.xcodeproj/project.pbxproj b/SwiftyExpat.xcodeproj/project.pbxproj index 7d49837..8cf1fba 100644 --- a/SwiftyExpat.xcodeproj/project.pbxproj +++ b/SwiftyExpat.xcodeproj/project.pbxproj @@ -439,6 +439,7 @@ "-D", HAVE_EXPAT_CONFIG_H, ); + OTHER_SWIFT_FLAGS = "-DXcode"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; @@ -491,6 +492,7 @@ "-D", HAVE_EXPAT_CONFIG_H, ); + OTHER_SWIFT_FLAGS = "-DXcode"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.0; diff --git a/SwiftyExpatTests/SwiftyExpatTests.swift b/SwiftyExpatTests/SwiftyExpatTests.swift index fe159a0..81c9409 100644 --- a/SwiftyExpatTests/SwiftyExpatTests.swift +++ b/SwiftyExpatTests/SwiftyExpatTests.swift @@ -9,6 +9,10 @@ import Cocoa import XCTest import SwiftyExpat +#if Xcode // wasn't there an SPM flag? +#else + import Expat +#endif class SwiftyExpatTests: XCTestCase {