-
Notifications
You must be signed in to change notification settings - Fork 468
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
Cannot open include file: 'tommath.h' #681
Comments
If you want to use libtommath, you have to have it available on the system you're building libtomcrypt. Either install libtommath via your package manager or you could also clone the libtommath repository and build it via CMake, which will in turn add that build to your local CMake registry. |
Note that the package managers probably don't build using CMake (I know for a fact that the Debian package doesn't), which means that you won't get libtommathConfig.cmake with it. It's appropriate to fall back to using pkg-config. I've a package that does exactly this for libtomcrypt: find_package(libtomcrypt QUIET)
if (libtomcrypt_FOUND)
set(LIBTOMCRYPT libtomcrypt)
else()
find_package(PkgConfig)
pkg_check_modules(libtomcrypt REQUIRED IMPORTED_TARGET libtomcrypt)
set(LIBTOMCRYPT PkgConfig::libtomcrypt)
endif() |
Would it maybe make sense to have this snippet somewhere available? |
Perhaps. Not sure where, though... Application writer documentation or something like that? |
Hello,
Unable to build. It throws the following error.
Error C1083 Cannot open include file: 'tommath.h': No such file or directory libtomcrypt
cmake build error
Could not find a package configuration file provided by "libtommath"
(requested version 1.2.0) with any of the following names:
The text was updated successfully, but these errors were encountered: