How to change output directory for a target

前端 未结 7 1816
执笔经年
执笔经年 2020-12-13 12:12

I am using a workspace where I have a main app project and then a static library project which is used by the main app. I want static library project to spit out libX.a into

7条回答
  •  旧巷少年郎
    2020-12-13 13:04

    In Xcode 8.x I set the derivedData directory with a command line option in a .sh file that builds the project. Developers can build into their user directories (default Xcode preference), while the official build creates the build in the traditional area:

    SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

    xcodebuild -workspace 'my project.xcworkspace' -scheme 'my project' -configuration Release -derivedDataPath '$SCRIPT_DIR/build'

提交回复
热议问题