Skip to content

Commit

Permalink
Use Hunter to install fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Nov 1, 2019
1 parent 279aefd commit 54e0323
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ cmake_minimum_required(VERSION 3.2)
#---------------------------------------------------------------------------------------
# Start spdlog project
#---------------------------------------------------------------------------------------
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.20.64.tar.gz"
SHA1 "7b830dfda7a094b2af15f44b24ebd2489404d880"
)
include(GNUInstallDirs)
include(cmake/utils.cmake)
include(cmake/ide.cmake)
Expand Down Expand Up @@ -125,7 +130,8 @@ target_link_libraries(spdlog_header_only INTERFACE Threads::Threads)
#---------------------------------------------------------------------------------------
if(SPDLOG_FMT_EXTERNAL)
if (NOT TARGET fmt::fmt)
find_package(fmt REQUIRED)
hunter_add_package(fmt)
find_package(fmt REQUIRED CONFIG)
endif ()
target_compile_definitions(spdlog PUBLIC SPDLOG_FMT_EXTERNAL)
target_link_libraries(spdlog PUBLIC fmt::fmt)
Expand Down Expand Up @@ -231,4 +237,3 @@ if (SPDLOG_INSTALL)
include(cmake/spdlogCPack.cmake)

endif ()

0 comments on commit 54e0323

Please sign in to comment.