Add crypto++ detect for cmake
This commit is contained in:
parent
1ac5203e38
commit
9dc95b5197
7 changed files with 67 additions and 11 deletions
36
cmake/Modules/FindCrypto++.cmake
Normal file
36
cmake/Modules/FindCrypto++.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
# - Find Crypto++
|
||||
|
||||
if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
set(CRYPTO++_FOUND TRUE)
|
||||
|
||||
else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
find_path(CRYPTO++_INCLUDE_DIR cryptlib.h
|
||||
/usr/include/crypto++
|
||||
/usr/include/cryptopp
|
||||
/usr/local/include/crypto++
|
||||
/usr/local/include/cryptopp
|
||||
/opt/local/include/crypto++
|
||||
/opt/local/include/cryptopp
|
||||
$ENV{SystemDrive}/Crypto++/include
|
||||
)
|
||||
|
||||
find_library(CRYPTO++_LIBRARIES NAMES cryptopp
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
$ENV{SystemDrive}/Crypto++/lib
|
||||
)
|
||||
|
||||
if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
set(CRYPTO++_FOUND TRUE)
|
||||
message(STATUS "Found Crypto++: ${CRYPTO++_INCLUDE_DIR}, ${CRYPTO++_LIBRARIES}")
|
||||
else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
set(CRYPTO++_FOUND FALSE)
|
||||
message(STATUS "Crypto++ not found.")
|
||||
endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
|
||||
mark_as_advanced(CRYPTO++_INCLUDE_DIR CRYPTO++_LIBRARIES)
|
||||
|
||||
endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue