aboutsummaryrefslogtreecommitdiff
path: root/cmake/Findspdlog.cmake
blob: e286724a58fd6a2db96fb02f7b3db5b3b5f0a908 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(FindPackageHandleStandardArgs)

find_library(SPDLOG_LIBRARY NAMES spdlog)

find_package_handle_standard_args(spdlog REQUIRED_VARS SPDLOG_LIBRARY)

if (SPDLOG_FOUND)
    mark_as_advanced(SPDLOG_LIBRARY)
endif()

if(SPDLOG_FOUND AND NOT TARGET spdlog::spdlog)
    add_library(spdlog::spdlog IMPORTED UNKNOWN)
    set_property(TARGET spdlog::spdlog PROPERTY IMPORTED_LOCATION ${SPDLOG_LIBRARY})
endif()