XCODE_EMBED_FRAMEWORKS chooses the wrong directory for targets in a subdirectory
For a project with the directory structure root:
- subdir/
- CMakeLists.txt
- library.cpp
- CMakeLists.txt
- main.cpp
when setting XCODE_EMBED_FRAMEWORKS
on the main target with the target created in the subdir, Xcode will complain error: <CMAKE BUILD DIR>/Debug/libsubdir-library.a: No such file or directory
. This is because the actual build path of libsubdir-library
is <CMAKE BUILD DIR>/subdir/Debug/libsubdir-library.a
Tested on 3.22 RC3.
Example project attached: test-xcode-embed-frameworks.zip
Edited by Mitchell Wong