Updating cmake so it exit if libraries are missing. Adding FindBoost and upating FindCryptoPP.

This commit is contained in:
Meeh 2014-04-04 01:54:21 +02:00
parent f7b3e9c933
commit e38f7c884c
3 changed files with 1240 additions and 26 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,28 +1,35 @@
# Find Crypto++ library
#
# Output variables :
# CryptoPP_FOUND
# CryptoPP_INCLUDE_DIRS
# CryptoPP_LIBRARIES
#
# - Find Crypto++
if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)
set(CRYPTO++_FOUND TRUE)
FIND_PATH( CryptoPP_INCLUDE_DIR cryptopp/dsa.h )
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( CryptoPP_LIBRARY NAMES cryptopp )
find_library(CRYPTO++_LIBRARIES NAMES cryptopp
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
$ENV{SystemDrive}/Crypto++/lib
)
# handle the QUIETLY and REQUIRED arguments and set CRYPTOPP_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CryptoPP DEFAULT_MSG CryptoPP_LIBRARY CryptoPP_INCLUDE_DIR)
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)
set ( CryptoPP_FOUND FALSE )
if ( ${CRYPTOPP_FOUND} )
set ( CryptoPP_FOUND TRUE )
set ( CryptoPP_INCLUDE_DIRS ${CryptoPP_INCLUDE_DIR} )
set ( CryptoPP_LIBRARIES ${CryptoPP_LIBRARY} )
endif ()
MARK_AS_ADVANCED(CryptoPP_INCLUDE_DIR CryptoPP_LIBRARY)
mark_as_advanced(CRYPTO++_INCLUDE_DIR CRYPTO++_LIBRARIES)
endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES)