Link the Mac Framework File with CMake
While writing program on Mac, sometimes we need to link framework and libraries under OSX folder System/Library/Frameworks. There are so many frameworks like CoreMedia & VideoToolBox, which you will use in FFMpeg or something else someday.
In this situation, we have to use find_library as it includes some special handling for frameworks on OSX.
Also, don’t use link_directories, CMake use full paths to libraries and it’s not needed.
Here’s some simple example with CoreMedia: