mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
87095a9f1f
As per CMake's Importing and Exporting Guide[1], configure_package_config_file() should be used for configuring the package configuration file, not the regular configure_file() function. This ensures that a spdlog package built on one system (with a given directory tree) can be imported from a different system - e.g. creating a pre-compiled spdlog package for use on different systems. [1]: https://cmake.org/cmake/help/git-stage/guide/importing-exporting/index.html#id8
19 lines
468 B
CMake
19 lines
468 B
CMake
# Copyright(c) 2019 spdlog authors
|
|
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
set(SPDLOG_FMT_EXTERNAL @SPDLOG_FMT_EXTERNAL@)
|
|
set(config_targets_file @config_targets_file@)
|
|
|
|
if(SPDLOG_FMT_EXTERNAL)
|
|
include(CMakeFindDependencyMacro)
|
|
find_dependency(fmt CONFIG)
|
|
endif()
|
|
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")
|
|
|
|
check_required_components(spdlog) |