@@ -50,13 +50,13 @@ swift build --triple %ANDROID_ARCH%-unknown-linux-android%ANDROID_API_LEVEL% ^
50
50
In order to build on Windows with CMake, some additional parameters must be passed to the build tool to locate the necessary Swift modules.
51
51
52
52
~~~
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"
54
54
~~~
55
55
56
56
In order to build on Linux with CMake, some additional parameters must be passed to the build tool to locate the necessary Swift modules.
57
57
58
58
~~~
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"
60
60
~~~
61
61
62
62
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 ^
75
75
-D CMAKE_SYSTEM_VERSION=%ANDROID_API_LEVEL% ^
76
76
-D CMAKE_Swift_COMPILER_TARGET=%ANDROID_ARCH%-unknown-linux-android%ANDROID_API_LEVEL% ^
77
77
-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=...
79
78
cmake --build build
80
79
~~~
81
80
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
+ ~~~
84
86
85
87
### Using
86
88
0 commit comments