diff --git a/Package.swift b/Package.swift index 6ed29f58b9f..35d719658cc 100644 --- a/Package.swift +++ b/Package.swift @@ -115,7 +115,7 @@ let package = Package( name: "PackageDescription", swiftSettings: [ .unsafeFlags(["-package-description-version", "999.0"]), - .unsafeFlags(["-enable-library-evolution"]) + .unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS])) ]), // The `PackagePlugin` target provides the API that is available to @@ -125,7 +125,7 @@ let package = Package( name: "PackagePlugin", swiftSettings: [ .unsafeFlags(["-package-description-version", "999.0"]), - .unsafeFlags(["-enable-library-evolution"]) + .unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS])) ]), // MARK: SwiftPM specific support libraries diff --git a/Sources/PackageDescription/CMakeLists.txt b/Sources/PackageDescription/CMakeLists.txt index 9c063e27641..896a75ba41b 100644 --- a/Sources/PackageDescription/CMakeLists.txt +++ b/Sources/PackageDescription/CMakeLists.txt @@ -21,10 +21,10 @@ add_library(PackageDescription target_compile_options(PackageDescription PUBLIC $<$:-package-description-version$999.0>) -target_compile_options(PackageDescription PUBLIC - $<$:-enable-library-evolution>) if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin) + target_compile_options(PackageDescription PUBLIC + $<$:-enable-library-evolution>) set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/ManifestAPI/PackageDescription.swiftinterface) target_compile_options(PackageDescription PUBLIC $<$:-emit-module-interface-path$${SWIFT_INTERFACE_PATH}>) diff --git a/Sources/PackagePlugin/CMakeLists.txt b/Sources/PackagePlugin/CMakeLists.txt index 91f07ea3a0e..24c056e063d 100644 --- a/Sources/PackagePlugin/CMakeLists.txt +++ b/Sources/PackagePlugin/CMakeLists.txt @@ -17,10 +17,10 @@ add_library(PackagePlugin target_compile_options(PackagePlugin PUBLIC $<$:-package-description-version$999.0>) -target_compile_options(PackagePlugin PUBLIC - $<$:-enable-library-evolution>) if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin) + target_compile_options(PackagePlugin PUBLIC + $<$:-enable-library-evolution>) set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/PluginAPI/PackagePlugin.swiftinterface) target_compile_options(PackagePlugin PUBLIC $<$:-emit-module-interface-path$${SWIFT_INTERFACE_PATH}>)