This is a follow up to #15 .
@Dawars made a great work for having modern CMake constructs. However, the FindLibRaw.cmake file is being installed in the Modules/ directory of the cmake used.
This creates a few issues:
- On machine with more than one CMake executable, it will not be found unless one runs the very same cmake. (If you are a user of CLion IDE, this is a particularly annoying issue, as CLion comes with its own CMake packaging)
- If the cmake exectuable is system installed, the directory may not be writable.
Instead I am making a version using the approach detailed in this page: Installing - Modern CMake .
This approach has the advantage of installing the FindLibRaw.cmake in the proper place under CMAKE_INSTALL_PREFIX. For example, if you can install in the system /usr/local directory, then every user will find it without difficulty.
If you install it in a local directory of your own, then by using CMAKE_MODULE_PATH to point CMAKE_INSTALL_PREFIX, then the library will be found without issue.
I have create a fork with the fixes I'm testing at: https://github.com/FunMiles/LibRaw-cmake/tree/fix/modern_install
PS: This might also address the issues in this old PR: #5