(1) To install the fat 5 architectures the following command is stated:
$ cmake -S. -B_builds -GXcode
-DCMAKE_SYSTEM_NAME=iOS
“-DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64;i386;x86_64”
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.3
-DCMAKE_INSTALL_PREFIX=pwd/_install
-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO
-DCMAKE_IOS_INSTALL_COMBINED=YES
However, DCMAKE_OSX_ARCHITECTURES is in hyphens. Removing this causes an error, also when selecting only a single architecture:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk
is not the same length as CMAKE_OSX_ARCHITECTURES:
armv7s
and
-DCMAKE_OSX_DEPLOYMENT_TARGET=9.3: command not found
(2) Then, when I try to run the install command
$ cmake --build _builds --config Release --target install
I receive the error
xcodebuild: error: The project ‘primitives_library.xcodeproj’ does not contain a target named ‘install’.
Cheers, this indeed removes the related errors. My assumption was that this is avoiding the errors because the part in quotes is ignored. Good to know that this is for the semicolons.
My question on xcodebuild: error: The project ‘primitives_library.xcodeproj’ does not contain a target named ‘install’. remains
Also, shouldn’t -DCMAKE_INSTALL_PREFIX=../_install leave some file in …/_install? The folder remains empty.
I am having a few issues in this area and unfortunately it is hard to tell for me, whether it is caused by those cmake commands or by the CMakeLists.txt or elsewhere in the toolchain. With the example of Dart’s C interoperability I am also missing any .dylib file, which I was able to create with another example.
Some feedback on the CMake examples, if you don’t mind: While I can follow the steps, it is hard for me as a CMake beginner to understand what is being done and why - just as with those quotes. Also it appears that you use the same name for different things such as MathFunctions or Tutorial, which (if I understand this correctly) is once an executable and once a subdirectory. The examples themselves are very relevant, though.