CPack fails on mac SDL2: No such file or directory

Hi , I’m working with Visual Studio Code and in MacOS.
I managed to compile the project , however I’m getting errors while running the command cpack
`CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/BundleUtilities.cmake:454 (message):
otool -l failed: 1

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:
error: ‘@rpath/SDL2.framework/Versions/A/SDL2’: No such file or directory

Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/BundleUtilities.cmake:523 (get_item_rpaths)
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/BundleUtilities.cmake:645 (set_bundle_key_values)
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/BundleUtilities.cmake:925 (get_bundle_keys)
/Users/shachar/projects/vcmi/cmake/osx/cmake_install.cmake:50 (fixup_bundle)
/Users/shachar/projects/vcmi/cmake/cmake_install.cmake:68 (include)`

I noticed that there is some TODO comment in the CMakeLists.txt file

`# TODO

macOS:

- There is problem with running fixup_bundle in main project after subdirectories.

Cmake put them after all install code of main CMakelists in cmake_install.cmake

Currently I just added extra add_subdirectory and CMakeLists.txt in osx directory to bypass that.

- Try to fix build with RPATH.

Currently if CMAKE_MACOSX_RPATH=1 then AI libs unable to find @rpath/libvcmi.dylib

I tried to set few different INSTALL_RPATH for all targets in AI directory, but nothing worked.`

but I didn’t understand what should I do to overcome the issue.
Will appreciate help with this , as I’m new to c++ (java developer :))
Thank you