If SPDLOG_BUILD_SHARED is set, set BUILD_SHARED_LIBS to ON as well

This commit is contained in:
gabime 2023-12-23 16:30:34 +02:00
parent 3fe640e270
commit 3b93c53e33

View File

@ -126,6 +126,7 @@ if(SPDLOG_TIDY)
endif() endif()
if(SPDLOG_BUILD_SHARED) if(SPDLOG_BUILD_SHARED)
set(BUILD_SHARED_LIBS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif() endif()
@ -234,7 +235,7 @@ set(SPDLOG_SRCS
"src/sinks/wincolor_sink.cpp") "src/sinks/wincolor_sink.cpp")
if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
if(WIN32) if(WIN32)
set(VERSION_RC ${CMAKE_CURRENT_BINARY_DIR}/version.rc ) 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) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)