[Bug 266279] devel/cmake: cmake fails to find *.cmake files in /usr/local/lib/cmake
Date: Wed, 07 Sep 2022 18:25:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266279
Bug ID: 266279
Summary: devel/cmake: cmake fails to find *.cmake files in
/usr/local/lib/cmake
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: yuri@freebsd.org
This CMakeLists.txt file:
> cmake_minimum_required(VERSION 3.12)
> find_package(OpenCASCADE REQUIRED)
fails to find OpenCASCADE:
> $ cmake -DCMAKE_MODULE_PATH=/usr/local .
> ...skipped...
> CMake Error at CMakeLists.txt:10 (find_package):
> By not providing "FindOpenCASCADE.cmake" in CMAKE_MODULE_PATH this project
> has asked CMake to find a package configuration file provided by
> "OpenCASCADE", but CMake did not find one.
>
> Could not find a package configuration file provided by "OpenCASCADE" with
> any of the following names:
>
> OpenCASCADEConfig.cmake
> opencascade-config.cmake
>
> Add the installation prefix of "OpenCASCADE" to CMAKE_PREFIX_PATH or set
> "OpenCASCADE_DIR" to a directory containing one of the above files. If
> "OpenCASCADE" provides a separate development package or SDK, be sure it
> has been installed.
opencascade-7.6.0_6 does install the file
/usr/local/lib/cmake/OpenCASCADEConfig.cmake,
I am not sure if -DCMAKE_MODULE_PATH=/usr/local is required, it probably isn't.
There are at least 2 other ports that suffer from the same problem:
science/axom and science/serac - they also install *.cmake files into
lib/cmake.
Why aren't these projects discovered by cmake? Is it wrong to place *.cmake
files into lib/cmake?
Should cmake be altered to look in lib/cmake?
--
You are receiving this mail because:
You are the assignee for the bug.