@@ -269,22 +269,23 @@ else()
269
269
endif ()
270
270
271
271
# Configure 'SwiftCompilerModules' SwiftPM package. The 'Package.swift' will
272
- # be created at '${build_dir}/SwiftCompilerSources /Package.swift' and can be
273
- # built with 'swift-build'.
272
+ # be created at '${build_dir}/SwiftCompilerModulesPackage /Package.swift' and can
273
+ # be built with 'swift-build'.
274
274
# Note that this SwiftPM package itself is just for development purposes, and
275
275
# is not actually used for the compiler building.
276
- set (swiftcompiler_source_dir_name "_Sources" )
276
+ set (swiftcompiler_modules_package_directory
277
+ "${SWIFT_BINARY_DIR} /SwiftCompilerModulesPackage" )
277
278
configure_file (Package.swift.in
278
- "${CMAKE_CURRENT_BINARY_DIR } /Package.swift" @ONLY )
279
+ "${swiftcompiler_modules_package_directory } /Package.swift" @ONLY )
279
280
# SwiftPM requires all sources are inside the directory of 'Package.swift'.
280
281
# Create symlinks to the actual source directories.
281
282
execute_process (COMMAND
282
283
"${CMAKE_COMMAND} " -E create_symlink
283
284
"${CMAKE_CURRENT_SOURCE_DIR} /Sources"
284
- "${CMAKE_CURRENT_BINARY_DIR} / ${swiftcompiler_source_dir_name} " )
285
+ "${swiftcompiler_modules_package_directory} /Sources " )
285
286
if (SWIFT_BUILD_REGEX_PARSER_IN_COMPILER )
286
287
execute_process (COMMAND
287
288
"${CMAKE_COMMAND} " -E create_symlink
288
289
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR} /Sources/_RegexParser"
289
- "${CMAKE_CURRENT_BINARY_DIR } /_RegexParser_Sources" )
290
+ "${swiftcompiler_modules_package_directory } /_RegexParser_Sources" )
290
291
endif ()
0 commit comments