openmoonray icon indicating copy to clipboard operation
openmoonray copied to clipboard

Fix CMake vars for module discovery and install

Open YakoYakoYokuYoku opened this issue 1 year ago • 1 comments

Fixes issues with erroneous discovery of Moonray dependencies.

Namely, if the first directory of $PATH is set to /bin then /bin, /lib and /include would be used as search paths.

-- Found Boost: /lib/cmake/Boost-1.81.0/BoostConfig.cmake (found version "1.81.0") found components: chrono date_time filesystem program_options system 
-- Found Boost: /lib/cmake/Boost-1.81.0/BoostConfig.cmake (found version "1.81.0") found components: chrono date_time filesystem program_options 
-- Found Python: /bin/python3.11 (found version "3.11.3") found components: Interpreter

But /include doesn't exist in your standard Linux install, so CMake is going to look at the wrong place if it were to look for headers.

Also this PR uses list(PREPEND ...) with CMAKE_MODULE_PATH so that it considers project paths first and CMAKE_INSTALL_PREFIX is assigned to the default value of release if unset.

YakoYakoYokuYoku avatar Jul 13 '23 18:07 YakoYakoYokuYoku

Thank you for submitting a Pull Request. Developers who wish to contribute code to be considered for inclusion in MoonRay must first complete a Contributor License Agreement, and email it to [email protected] and be sure to include your GitHub username(s).

jlanz avatar Jul 14 '23 18:07 jlanz