To compile my software for MacOs I would need to copy the following four frameworks into the System frameworks folder.
Library/Frameworks/SDL2.framework
Library/Frameworks/SDL2_mixer.framework
Library/Frameworks/SDL2_ttf.framework
Library/Frameworks/SDL2_image.framework
Unfortunately, when I tried to copy one by one the the four "framework" to the place where all other SDL frameworks are stored (/Library/Frameworks directory), the access was denied.
OK, to compile the application you need to either copy the SDL2 frameworks to /Library/Frameworks or tell the linker where to find them.
To copy them to /Library/Frameworks you will need to open am Applications > Utilities > Terminal, change to the directory in which the frameworks are located and copy them to the destination using eg:
sudo rsync -rv SDL2* /Library/Frameworks
Alternatively, to tell the linker where to find them, in the Lazarus IDE go to Project > Project Options > Compiler Options > Compilation and Linking and there you will have to check the option "Pass options to linker with -k, delimiter is space" and enter the following:
-F/path/to/SDL2_frameworks
(The trick here is NOT to enter -k at all as Lazarus does this automatically).
Of course you will probably also need the {$linkframework whatever} directive(s) in your Pascal unit(s).
When it comes to distributing your application, you will need to include the frameworks as previously indicated in the application bundle.