CMake fails to find icu4c library with relative path
Hello. I think i found a bug in CMake while building one small game on macOS (latest version with latest updates).
I have a repo which will help you to reproduce this bug quickly. Here is a link (https://github.com/colobot/colobot/) and here is manual for macOS (https://github.com/colobot/colobot/blob/master/INSTALL-MacOSX.md). Actually you can try to clone and build it, it takes 5-10 minutes.
I getting an error at 'make package':
Run CPack packaging tool...
CPack: Create package using Bundle
CPack: Install projects
CPack: - Run preinstall target for: colobot
CPack: - Install project: colobot
CMake Error at /usr/local/Cellar/cmake/3.13.4/share/cmake/Modules/BundleUtilities.cmake:451 (message):
otool -l failed: 1
/Library/Developer/CommandLineTools/usr/bin/objdump:
'@loader_path/libicudata.63.dylib': No such file or directory
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.13.4/share/cmake/Modules/BundleUtilities.cmake:520 (get_item_rpaths)
/usr/local/Cellar/cmake/3.13.4/share/cmake/Modules/BundleUtilities.cmake:658 (set_bundle_key_values)
/usr/local/Cellar/cmake/3.13.4/share/cmake/Modules/BundleUtilities.cmake:934 (get_bundle_keys)
/Users/vladislavbogomaz/Documents/projects/colobot/build/desktop/cmake_install.cmake:39 (fixup_bundle)
/Users/vladislavbogomaz/Documents/projects/colobot/build/cmake_install.cmake:40 (include)
CPack Error: Error when generating package: colobot
make: *** [package] Error 1
It so happened i discussed this error with one of Homebrew maintainers and he said it looks like bug in CMake. Here is link to github issue(https://github.com/Homebrew/homebrew-core/issues/36685) where you can find our conversation and useful information about my OS and console outputs.
Edited by Vladislav