Xcode: install SCRIPT command unexpectedly copies dependent lib and app bundle instead of just the app bundle
I use CMake's install(SCRIPT
capability to run the Xcode's archive command to generate an *.xcarchive for iOS in preparation for making the *.ipa file for App Store submission. Starting with the 3.25 RCs, I'm getting extra files copied into it. I made a branch and stripped out a bunch of stuff to try to provide a reasonable repro. Please run these commands:
- git clone https://github.com/ssrobins/sdl2-example.git
- cd sdl2-example
- git checkout cmake_install_bug
- cmake --preset=ios
- cmake --build build_ios --config Release
- cmake --install build_ios
The install puts the dependent lib libadd.a inside the *.xcarchive as shown in the install command output or by navigating inside the *.xcarchive in Finder. Since only the executable's CMakeLists.txt file has an install command, I would expect only the executable app bundle to be copied into it, which is exactly what happens when I repeat the above steps with CMake 3.24.2.
Environment:
- Xcode 13.4.1
- CMake 3.25.0-rc2
- macOS Monterey 12.6