[Bug 266279] devel/cmake: cmake fails to find *.cmake files in /usr/local/lib/cmake
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Sep 17 22:39:17 BST 2022
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266279
Adriaan de Groot <adridg at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |Works As Intended
Status|New |Closed
CC| |adridg at freebsd.org
--- Comment #3 from Adriaan de Groot <adridg at freebsd.org> ---
First off, OpenCASCADE (cad/opencascade) is installing its CMake Config files
to the wrong place. Installing into ${LOCALBASE}/share/OpenCASCADE/ would make
it "just work". Like rttr, ECM, and Eigen3.
The right flag for debugging problems with finding packages using CMake is
`--debug-find`, not `--trace`. Trace tells you what is executed, but it can't
execute what it can't find. On the other hand, debug-find tells you where it
looked, and why.
There's a difference between *modules* (e.g. FindOpenCASCADE.cmake) and
*config* (e.g. OpenCASCADEConfig.cmake). Different paths are used for
searching. The error message you posted tells you that find *modules* are
looked-for in the MODULE path, and that *configs* are looked-for in the PREFIX.
It's not super-duper clear, not there and not in the help for `find_package()`,
but if you follow the instructions:
$ rm CMakeCache.txt ; cmake --debug-find . -DCMAKE_PREFIX_PATH=/usr/local/lib
<snip lots of output>
find_package considered the following locations for OpenCASCADE's Config
module:
/tmp/pr-266279/CMakeFiles/pkgRedirects/OpenCASCADEConfig.cmake
/tmp/pr-266279/CMakeFiles/pkgRedirects/opencascade-config.cmake
/usr/local/lib/OpenCASCADEConfig.cmake
/usr/local/lib/opencascade-config.cmake
/usr/local/lib/cmake/OpenCASCADEConfig.cmake
The file was found at
/usr/local/lib/cmake/OpenCASCADEConfig.cmake
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the kde-freebsd
mailing list