diff options
author | Ladislav Zezula <zezula@volny.cz> | 2021-12-24 16:47:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-24 16:47:05 +0100 |
commit | fb9b3d4ba173d3ff4c70b0e404f6b4ebee864ce9 (patch) | |
tree | 31d8688c88c544afb764e75ebf22dabf27ed2372 | |
parent | 24c56b38398b8a3ea6758073016de8cb8978aeb7 (diff) | |
parent | 329dcde478ce957f0f98a03065062a4fa71436cd (diff) |
Merge pull request #234 from AMDmi3/tomcrypt-detection
Merged. Thanks for the contribution :-)
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a44170c..7d024da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -296,7 +296,12 @@ else() option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF) if(WITH_LIBTOMCRYPT) - set(LINK_LIBS ${LINK_LIBS} tomcrypt) + include(FindPkgConfig) + pkg_check_modules(PC_LIBTOMCRYPT libtomcrypt REQUIRED) + find_path(LIBTOMCRYPT_INCLUDE_DIR NAMES tomcrypt.h HINTS ${PC_LIBTOMCRYPT_INCLUDE_DIRS} REQUIRED) + find_library(LIBTOMCRYPT_LIBRARY NAMES tomcrypt HINTS ${PC_LIBTOMCRYPT_LIBRARY_DIRS} REQUIRED) + set(LINK_LIBS ${LINK_LIBS} ${LIBTOMCRYPT_LIBRARY}) + include_directories(${LIBTOMCRYPT_INCLUDE_DIR}) else() set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES}) endif() |