encfs/vendor/github.com/muflihun/easyloggingpp/cmake/FindEASYLOGGINGPP.cmake
Valient Gough 5f0806c5cc Add "easylogging" from "https://github.com/muflihun/easyloggingpp@master"
git-vendor-name: easylogging
git-vendor-dir: vendor/github.com/muflihun/easyloggingpp
git-vendor-repository: https://github.com/muflihun/easyloggingpp
git-vendor-ref: master
2017-08-05 23:23:41 -07:00

39 lines
1.2 KiB
CMake

#
# CMake module for Easylogging++ logging library
#
# Defines ${EASYLOGGINGPP_INCLUDE_DIR}
#
# If ${EASYLOGGINGPP_USE_STATIC_LIBS} is ON then static libs are searched.
# In these cases ${EASYLOGGINGPP_LIBRARY} is also defined
#
# (c) 2017 Muflihun Labs
#
# https://github.com/muflihun/easyloggingpp
# https://muflihun.com
#
message ("-- Easylogging++: Searching...")
set(EASYLOGGINGPP_PATHS ${EASYLOGGINGPP_ROOT} $ENV{EASYLOGGINGPP_ROOT})
find_path(EASYLOGGINGPP_INCLUDE_DIR
easylogging++.h
PATH_SUFFIXES include
PATHS ${EASYLOGGINGPP_PATHS}
)
if (EASYLOGGINGPP_USE_STATIC_LIBS)
message ("-- Easylogging++: Static linking is preferred")
find_library(EASYLOGGINGPP_LIBRARY
NAMES libeasyloggingpp.a libeasyloggingpp.dylib libeasyloggingpp
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
elseif (EASYLOGGINGPP_USE_SHARED_LIBS)
message ("-- Easylogging++: Dynamic linking is preferred")
find_library(EASYLOGGINGPP_LIBRARY
NAMES libeasyloggingpp.dylib libeasyloggingpp libeasyloggingpp.a
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
endif()
find_package_handle_standard_args(EASYLOGGINGPP REQUIRED_VARS EASYLOGGINGPP_INCLUDE_DIR)