Skip to content

Commit

Permalink
Merge pull request #2029 from daverigby/relocatable_export
Browse files Browse the repository at this point in the history
Ensure exported package is relocatable
  • Loading branch information
gabime authored Aug 4, 2021
2 parents dd6d203 + 87095a9 commit d368ed5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ if(SPDLOG_INSTALL)
install(EXPORT spdlog DESTINATION ${export_dest_dir} NAMESPACE spdlog:: FILE ${config_targets_file})

include(CMakePackageConfigHelpers)
configure_file("${project_config_in}" "${project_config_out}" @ONLY)
configure_package_config_file("${project_config_in}" "${project_config_out}"
INSTALL_DESTINATION ${export_dest_dir})

write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion)
install(FILES "${project_config_out}" "${version_config_file}" DESTINATION "${export_dest_dir}")
Expand Down
4 changes: 4 additions & 0 deletions cmake/spdlogConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 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@)
Expand All @@ -13,3 +15,5 @@ endif()


include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")

check_required_components(spdlog)

0 comments on commit d368ed5

Please sign in to comment.