mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
place dlls in the same directory as the executables on msvc
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
include(FetchContent)
|
||||
|
||||
# Always build static fmtlib version
|
||||
set(BUILD_SHARED_LIBS_ORIG "${BUILD_SHARED_LIBS}")
|
||||
#set(BUILD_SHARED_LIBS OFF CACHE BOOL "Disable BUILD_SHARED_LIBS for fmtlib" FORCE)
|
||||
|
||||
Set(FETCHCONTENT_QUIET FALSE)
|
||||
FetchContent_Declare(
|
||||
fmt
|
||||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||
@@ -9,10 +14,11 @@ 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} EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
|
||||
endif ()
|
||||
|
||||
# Restore BUILD_SHARED_LIBS
|
||||
set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_ORIG}" CACHE BOOL "Restore BUILD_SHARED_LIBS" FORCE)
|
Reference in New Issue
Block a user