How to add environment configuration to workspace with multiple projects using xcconfig files
Asked Answered
D

1

7

I created sample project to demonstrate the problem https://github.com/pikciu/XCodeWorksapce/tree/noPods

  • invalid paths to frameworks
  • frameworks build in different configuration than main project.

There are 4 build configurations and 2 schemes. Every build configuration uses different xcconfig file. configuration Lib.framework is linked to the main project.

XCode builds frameworks in Release configuration even if main project is building in Debug. build fail

I have found these solutions: Xcode Build Configurations in Workspace With Multiple Projects and How to compile a project with app and library in the same workspace with different configuration names?

MODULES_BUILDS = $(DEFAULT_CONFIGURATION)-$(PLATFORM_NAME)
FRAMEWORK_SEARCH_PATHS = $(BUILD_DIR)/$(MODULES_BUILDS)
HEADER_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS)/include
LIBRARY_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS)

but it doesn't work. Maybe is it XCode 10 issue?

Domingo answered 25/10, 2018 at 1:35 Comment(3)
can you check out the targets again ?Dyspepsia
@Tobi what do you mean? I didn't change targets. There is still one targetPorker
I don't get it. What is the question? I cloned your sample and I see no issues. Can you explain a little bit more ?Naphthalene
E
1

Your Lib target is being built with the Release configuration. Change this setting Under Configurations of your Lib project, use the Debug configuration for command-line builds.

enter image description here

Excavation answered 9/11, 2018 at 2:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.