From 7768c6271c4bf8860eaa9363f122d90762d014fc Mon Sep 17 00:00:00 2001 From: Puneet Matharu Date: Mon, 17 Oct 2022 10:02:14 +0100 Subject: [PATCH] Export targets to build directory so that it can be found at configure time. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 975a0f6a..36e21745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,6 +329,10 @@ if(SPDLOG_INSTALL) # --------------------------------------------------------------------------------------- # Install CMake config files # --------------------------------------------------------------------------------------- + export( + TARGETS spdlog + NAMESPACE spdlog:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/${config_targets_file}") install(EXPORT spdlog DESTINATION ${export_dest_dir} NAMESPACE spdlog:: FILE ${config_targets_file}) include(CMakePackageConfigHelpers)