Created
February 7, 2018 07:02
-
-
Save omochi/2a2ebe3cf99a1e5a63fbf6a38c587dc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import PathKit | |
import xcproj | |
let repoDir = Path(FileManager.default.currentDirectoryPath).parent() | |
let xcodeProjPath = repoDir + "MyProject.xcodeproj" | |
let xcodeProj = try XcodeProj(path: xcodeProjPath) | |
let target: PBXTarget = xcodeProj.pbxproj.objects.getTarget(reference: "SQLite.swift::SQLiteObjc")! | |
let configList = xcodeProj.pbxproj.objects.configurationLists[target.buildConfigurationList!]! | |
for config in configList.buildConfigurations { | |
let buildConfig = xcodeProj.pbxproj.objects.buildConfigurations[config]! | |
buildConfig.buildSettings["CLANG_ENABLE_MODULES"] = "YES" | |
} | |
try xcodeProj.write(path: xcodeProjPath) |
In Makefile
xcode:
swift package generate-xcodeproj
cd Script; \
swift run fix-xcodeproj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xcproj: https://github.com/xcodeswift/xcproj