mirror of
https://github.com/gabime/spdlog.git
synced 2025-02-04 19:56:46 +08:00
Updated cmake messages
This commit is contained in:
parent
3b93c53e33
commit
8a0f87406b
@ -11,7 +11,6 @@ include(cmake/ide.cmake)
|
||||
spdlog_extract_version()
|
||||
|
||||
project(spdlog VERSION ${SPDLOG_VERSION} LANGUAGES CXX)
|
||||
message(STATUS "Build spdlog: ${SPDLOG_VERSION}")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
@ -130,16 +129,29 @@ if(SPDLOG_BUILD_SHARED)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
message(STATUS "spdlog version: ${SPDLOG_VERSION}")
|
||||
message(STATUS "spdlog build type: " ${CMAKE_BUILD_TYPE})
|
||||
message(STATUS "spdlog build shared: " ${BUILD_SHARED_LIBS})
|
||||
message(STATUS "spdlog use std format: " ${SPDLOG_USE_STD_FORMAT})
|
||||
message(STATUS "spdlog fmt external: " ${SPDLOG_FMT_EXTERNAL})
|
||||
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Find {fmt} library if not using std::format
|
||||
# ---------------------------------------------------------------------------------------
|
||||
if(NOT SPDLOG_USE_STD_FORMAT)
|
||||
if (SPDLOG_FMT_EXTERNAL)
|
||||
find_package(fmt REQUIRED)
|
||||
message(STATUS "Using external fmt lib version: ${fmt_VERSION}")
|
||||
else()
|
||||
include(cmake/fmtlib.cmake)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Threads library is required
|
||||
# ---------------------------------------------------------------------------------------
|
||||
find_package(Threads REQUIRED)
|
||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Library sources
|
||||
# ---------------------------------------------------------------------------------------
|
||||
|
@ -1,6 +1,5 @@
|
||||
include(FetchContent)
|
||||
|
||||
Set(FETCHCONTENT_QUIET FALSE)
|
||||
FetchContent_Declare(
|
||||
fmt
|
||||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||
@ -10,9 +9,10 @@ FetchContent_Declare(
|
||||
|
||||
FetchContent_GetProperties(fmt)
|
||||
if(NOT fmt_POPULATED)
|
||||
message(STATUS "Fetching fmt lib...")
|
||||
FetchContent_Populate(fmt)
|
||||
# We do not require os features of fmt
|
||||
set(FMT_OS OFF CACHE BOOL "Disable FMT_OS" FORCE)
|
||||
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
|
||||
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
endif ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user