Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FindSpdlog.cmake « modules « cmake - github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5397265100458f4af81d0f6bcd1a294fb464f4eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This module try to find spdlog lib
# Once done this will define
#
#  Spdlog_FOUND - system has spdlog lib
#  SPDLOG_INCLUDE_DIR - the spdlog include directory
#
# Available targets:
#  Spdlog::Spdlog

find_path(SPDLOG_INCLUDE_DIR spdlog/spdlog.h
  PATHS
    ENV SPDLOG_ROOT
    ENV SPDLOG_INCLUDE_DIR
    ${SPDLOG_ROOT}
    /usr
    /usr/local
    $ENV{HOME}/.local
  PATH_SUFFIXES
    include
  )
mark_as_advanced(SPDLOG_INCLUDE_DIR)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Spdlog
  REQUIRED_VARS SPDLOG_INCLUDE_DIR
  )

if(Spdlog_FOUND AND NOT TARGET Spdlog::Spdlog)
  add_library(Spdlog::Spdlog INTERFACE IMPORTED)
  set_target_properties(Spdlog::Spdlog PROPERTIES
    INTERFACE_INCLUDE_DIRECTORIES "${SPDLOG_INCLUDE_DIR}"
    )
endif()