smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
616 stars 156 forks source link

Change cmake install dir so that homebrew can auto-detect it #148

Closed RandomPrototypes closed 10 months ago

RandomPrototypes commented 1 year ago

Hello, I created a local homebrew repository to simplify the install of screen_capture_lite in one of my projects on MacOS. You can see the homebrew formula here if you are interested : screen_capture_lite_shared.rb The library can be install by the command brew install RandomPrototypes/tap-dev/screen_capture_lite_shared

To make this formula work, I had to do one small modification in the CMakeLists.txt By changing the cmake folder into lib/cmake/screen_capture_lite_shared/ or lib/cmake/screen_capture_lite_static/ instead of lib/cmake/screen_capture_lite/, it allows to auto detect the library when calling find_package(screen_capture_lite_shared REQUIRED) without having to specify the install folder.