summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-04-12 15:18:33 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-04-12 15:18:33 +0200
commit9dc95b5197cbee29558b044907328dda2d1bf07f (patch)
tree7fc7971f279b6c97b70edac67ffa65f9c43268bc /cmake/Modules
parent1ac5203e386e80f80906a341bf7ae9eaa124d774 (diff)
Add crypto++ detect for cmakeHEADmaster
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindCrypto++.cmake36
1 files changed, 36 insertions, 0 deletions
diff --git a/cmake/Modules/FindCrypto++.cmake b/cmake/Modules/FindCrypto++.cmake
new file mode 100644
index 0000000..37a4a9a
--- /dev/null
+++ b/cmake/Modules/FindCrypto++.cmake
@@ -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)
+