From 3b93c53e339af085c3283a27c56f189100c15f08 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 23 Dec 2023 16:30:34 +0200 Subject: [PATCH] If SPDLOG_BUILD_SHARED is set, set BUILD_SHARED_LIBS to ON as well --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0edca9d5..789f8123 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,6 +126,7 @@ if(SPDLOG_TIDY) endif() if(SPDLOG_BUILD_SHARED) + set(BUILD_SHARED_LIBS ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() @@ -234,7 +235,7 @@ set(SPDLOG_SRCS "src/sinks/wincolor_sink.cpp") -if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS) if(WIN32) set(VERSION_RC ${CMAKE_CURRENT_BINARY_DIR}/version.rc ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)