Added
Link Here
|
1 |
--- CMakeLists.txt.orig 2020-11-21 03:27:09 UTC |
2 |
+++ CMakeLists.txt |
3 |
@@ -293,7 +293,12 @@ else() |
4 |
|
5 |
option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF) |
6 |
if(WITH_LIBTOMCRYPT) |
7 |
- set(LINK_LIBS ${LINK_LIBS} tomcrypt) |
8 |
+ include(FindPkgConfig) |
9 |
+ pkg_check_modules(PC_LIBTOMCRYPT libtomcrypt REQUIRED) |
10 |
+ find_path(LIBTOMCRYPT_INCLUDE_DIR NAMES tomcrypt.h HINTS ${PC_LIBTOMCRYPT_INCLUDE_DIRS} REQUIRED) |
11 |
+ find_library(LIBTOMCRYPT_LIBRARY NAMES tomcrypt HINTS ${PC_LIBTOMCRYPT_LIBRARY_DIRS} REQUIRED) |
12 |
+ set(LINK_LIBS ${LINK_LIBS} ${LIBTOMCRYPT_LIBRARY}) |
13 |
+ include_directories(${LIBTOMCRYPT_INCLUDE_DIR}) |
14 |
else() |
15 |
set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES}) |
16 |
endif() |