client-root/cmake/FindTomCrypt.cmake

53 lines
1.6 KiB
CMake
Raw Normal View History

2019-07-01 06:40:51 -04:00
# - Try to find tomcrypt include dirs and libraries
#
# Usage of this module as follows:
#
# find_package(TomCrypt)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# TomCrypt_ROOT_DIR Set this variable to the root installation of
# TomCrypt if the module has problems finding the
# proper installation path.
#
# Variables defined by this module:
#
# TomCrypt_FOUND System has TomCrypt, include and library dirs found
# TomCrypt_INCLUDE_DIR The TomCrypt include directories.
# TomCrypt_LIBRARIES_STATIC The TomCrypt libraries.
# TomCrypt_LIBRARIES_SHARED The TomCrypt libraries.
include(tearoot-helper)
include(FindPackageHandleStandardArgs)
2019-07-01 06:40:51 -04:00
find_path(TomCrypt_ROOT_DIR
2019-07-03 07:27:12 -04:00
NAMES include/tomcrypt.h
HINTS ${TomCrypt_ROOT_DIR} ${TomCrypt_ROOT_DIR}/${BUILD_OUTPUT}
2019-07-01 06:40:51 -04:00
)
find_path(TomCrypt_INCLUDE_DIR
NAMES tomcrypt.h tomcrypt_cfg.h
2019-07-03 07:27:12 -04:00
HINTS ${TomCrypt_ROOT_DIR} ${TomCrypt_ROOT_DIR}/include/
2019-07-01 06:40:51 -04:00
)
find_library(TomCrypt_LIBRARIES_STATIC
2019-07-06 15:47:32 -04:00
NAMES tomcrypt.lib libtomcrypt.lib libtomcrypt.a
HINTS ${TomCrypt_ROOT_DIR} ${TomCrypt_ROOT_DIR}/lib
2019-07-01 06:40:51 -04:00
)
find_library(TomCrypt_LIBRARIES_SHARED
2019-07-06 15:47:32 -04:00
NAMES tomcrypt.dll libtomcrypt.dll libtomcrypt.so
HINTS ${TomCrypt_ROOT_DIR} ${TomCrypt_ROOT_DIR}/lib
2019-07-01 06:40:51 -04:00
)
find_package_handle_standard_args(TomCrypt DEFAULT_MSG
TomCrypt_INCLUDE_DIR
)
mark_as_advanced(
TomCrypt_ROOT_DIR
TomCrypt_INCLUDE_DIR
TomCrypt_LIBRARIES_STATIC
TomCrypt_LIBRARIES_SHARED
)