Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake error: Could not find a package configuration file #1456

Open
Helena2007 opened this issue May 13, 2024 · 2 comments
Open

cmake error: Could not find a package configuration file #1456

Helena2007 opened this issue May 13, 2024 · 2 comments
Labels
discussion General discussion about something

Comments

@Helena2007
Copy link

I am doing autoporting of geogram code using AdaptiveCpp. When executed the cmake command

cmake .. -DGeogram_DIR=/...../geogram/cmake -DAdaptiveCpp_DIR=/...../AdaptiveCpp/lib/cmake/AdaptiveCpp -DACPP_TARGETS='cuda:sm_86'
in geobox/build got the following error:

CMake Error at CMakeLists.txt:6 (find_package):
By not providing "FindGeogram.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Geogram", but
CMake did not find one.

Could not find a package configuration file provided by "Geogram" with any
of the following names:

GeogramConfig.cmake
geogram-config.cmake

Add the installation prefix of "Geogram" to CMAKE_PREFIX_PATH or set
"Geogram_DIR" to a directory containing one of the above files. If
"Geogram" provides a separate development package or SDK, be sure it has
been installed.
But I have already added the path to FindGeogram.cmake in the cmakelist of geobox using Geogram_DIR and also given the path while running the cmake command. No files named GeogramConfig.cmake or geogram-config.cmake are created.

@Helena2007 Helena2007 added the discussion General discussion about something label May 13, 2024
@nilsfriess
Copy link
Collaborator

I have no idea what geogram or geobox are and I‘m quite sure that your issue has nothing to do with AdaptiveCpp.

Anyways, CMake basically tells you what the problem is:

By not providing "FindGeogram.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Geogram", but
CMake did not find one.

Add the installation prefix of "Geogram" to CMAKE_PREFIX_PATH or set
"Geogram_DIR" to a directory containing one of the above files.

So you either have to modify CMAKE_MODULE_PATH to tell CMake where to find the file FindGeogram.cmake or you have to set Geogram_DIR to the directory that contains either GeogramConfig.cmake or geogram-config.cmake. It seems like you mixed both options.

@Helena2007
Copy link
Author

Modified CMAKE_MODULE_PATH to the path to the file FindGeogram.cmake, using the command: export CMAKE_MODULE_PATH=/...../geogram/cmake:$CMAKE_MODULE_PATH, but still the error persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussion about something
Projects
None yet
Development

No branches or pull requests

2 participants