Skip to content

Commit ba9be84

Browse files
committed
[swift-inspect] update CMake documentation
1 parent 9792a07 commit ba9be84

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tools/swift-inspect/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ swift build --triple %ANDROID_ARCH%-unknown-linux-android%ANDROID_API_LEVEL% ^
5050
In order to build on Windows with CMake, some additional parameters must be passed to the build tool to locate the necessary Swift modules.
5151

5252
~~~
53-
cmake -B out -G Ninja -S . -D ArgumentParser_DIR=... -D CMAKE_Swift_FLAGS="-Xcc -I%SDKROOT%\usr\include\swift\SwiftRemoteMirror"
53+
cmake -B out -G Ninja -S . -D CMAKE_Swift_FLAGS="-Xcc -I%SDKROOT%\usr\include\swift\SwiftRemoteMirror"
5454
~~~
5555

5656
In order to build on Linux with CMake, some additional parameters must be passed to the build tool to locate the necessary Swift modules.
5757

5858
~~~
59-
cmake -B out -G Ninja -S . -D ArgumentParser_DIR=... -D CMAKE_Swift_FLAGS="-Xcc -I$(git rev-parse --show-toplevel)/include/swift/SwiftRemoteMirror"
59+
cmake -B out -G Ninja -S . -D CMAKE_Swift_FLAGS="-Xcc -I$(git rev-parse --show-toplevel)/include/swift/SwiftRemoteMirror"
6060
~~~
6161

6262
In order to build for Android with CMake on Windows, some additiona parameters must be passed to the build tool to locate the necessary Swift modules.
@@ -75,12 +75,14 @@ cmake -B build -S . -G Ninja ^
7575
-D CMAKE_SYSTEM_VERSION=%ANDROID_API_LEVEL% ^
7676
-D CMAKE_Swift_COMPILER_TARGET=%ANDROID_ARCH%-unknown-linux-android%ANDROID_API_LEVEL% ^
7777
-D CMAKE_Swift_FLAGS="-sdk %SDKROOT_ANDROID% -L%ANDROID_NDK_ROOT%\toolchains\llvm\prebuilt\windows-x86_64\lib\clang\%ANDROID_CLANG_VERSION%\lib\linux\%ANDROID_ARCH% -Xclang-linker -resource-dir -Xclang-linker %ANDROID_NDK_ROOT%\toolchains\llvm\prebuilt\windows-x86_64\lib\clang\%ANDROID_CLANG_VERSION% -Xcc -I%SDKROOT_ANDROID%\usr\include -I%SDKROOT_ANDROID%\usr\include\swift\SwiftRemoteMirror" ^
78-
-D ArgumentParser_DIR=...
7978
cmake --build build
8079
~~~
8180

82-
Building with CMake requires a local copy of [swift-argument-parser](https://github.com/apple/swift-argument-parser) built with CMake.
83-
The `ArumentParser_DIR=` definition must refer to the `cmake/modules` sub-directory of the swift-argument-parser build output directory.
81+
Building with CMake can use a local copy of [swift-argument-parser](https://github.com/apple/swift-argument-parser) built with CMake.
82+
The `ArgumentParser_DIR=` definition must refer to the `cmake/modules` sub-directory of the swift-argument-parser build output directory.
83+
~~~cmd
84+
cmake -b out -G Ninja -S . -D ArgumentParser_DIR=S:\swift-argument-parser\build\cmake\modules
85+
~~~
8486

8587
### Using
8688

0 commit comments

Comments
 (0)