Xcode: CMake 3.24.1 regression in LIBRARY_SEARCH_PATHS value
- Have pre 3.24 version of the cmake in path
- Run build_xcode_project.sh script in the attached zip file
- Open the generated xcode-generator-test.xcodeproj and run target > My Mac
Expected: App compiles and runs successfully
- Have 3.24.1 version of the cmake in path
- Run build_xcode_project.sh script in the attached zip file
- Open the generated xcode-generator-test.xcodeproj and run target > My Mac
Expected: App compiles and run successfully Actual: App build fails
The reason seems to be that LIBRARY_SEARCH_PATH in the buildSettings is filled differently between cmake versions
cmake 3.24.1
LIBRARY_SEARCH_PATHS = ("/Users/jussi.salmi/Documents/repos-ext/cmake-xcode-generator-test/buildXcode/alib/(CONFIGURATION)
(EFFECTIVE_PLATFORM_NAME)/libalib.a","$(inherited)");
cmake 3.23.3
LIBRARY_SEARCH_PATHS = ("/Users/jussi.salmi/Documents/repos-ext/cmake-xcode-generator-test/buildXcode/alib/(CONFIGURATION)
(EFFECTIVE_PLATFORM_NAME)","$(inherited)");
cmake-xcode-generator-test.zip
If the library is added in the application CMakeLists.txt, instead of adding it using add_subdirectory, the 3.24.1 version creates correct LIBRARY_SEARCH_PATH as well.