1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-01-16 01:37:58 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
gabime
f78bca4ad8 Removed junk files 2020-03-12 16:09:34 +02:00
Gabi Melman
713feca582
Update CMakeLists.txt 2020-03-12 14:46:49 +02:00
Gabi Melman
26c20ed91d
Update CMakeLists.txt 2020-03-12 14:46:01 +02:00
Gabi Melman
e399249f31
Update CMakeLists.txt 2020-03-12 14:45:01 +02:00
Gabi Melman
b4a1b4b59a Updated verion.rc and CMakeLists.txt for dll build 2020-03-12 14:35:30 +02:00
Gabi Melman
b309a88bea Update utils.cmake 2020-03-12 14:29:39 +02:00
Gabi Melman
e88bee49a6 Added version info to dll build 2020-03-12 14:29:23 +02:00
3 changed files with 51 additions and 3 deletions

View File

@ -113,21 +113,25 @@ message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
set(SPDLOG_SRCS
src/spdlog.cpp
src/stdout_sinks.cpp
src/color_sinks.cpp
src/color_sinks.cpp
src/file_sinks.cpp
src/async.cpp
src/cfg.cpp)
if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
list(APPEND SPDLOG_SRCS src/fmt.cpp)
endif()
if(WIN32 AND SPDLOG_BUILD_SHARED)
list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()
if (SPDLOG_BUILD_SHARED)
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
if(WIN32)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
endif()
if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED)

View File

@ -20,6 +20,8 @@ function(spdlog_extract_version)
set(ver_patch ${CMAKE_MATCH_1})
set(SPDLOG_VERSION_MAJOR ${ver_major} PARENT_SCOPE)
set(SPDLOG_VERSION_MINOR ${ver_minor} PARENT_SCOPE)
set(SPDLOG_VERSION_PATCH ${ver_patch} PARENT_SCOPE)
set (SPDLOG_VERSION "${ver_major}.${ver_minor}.${ver_patch}" PARENT_SCOPE)
endfunction()

42
cmake/version.rc.in Normal file
View File

@ -0,0 +1,42 @@
#define APSTUDIO_READONLY_SYMBOLS
#include "winres.h"
#undef APSTUDIO_READONLY_SYMBOLS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION @SPDLOG_VERSION_MAJOR@,@SPDLOG_VERSION_MINOR@,@SPDLOG_VERSION_PATCH@,0
PRODUCTVERSION @SPDLOG_VERSION_MAJOR@,@SPDLOG_VERSION_MINOR@,@SPDLOG_VERSION_PATCH@,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "spdlog dll\0"
VALUE "FileVersion", "@SPDLOG_VERSION@.0\0"
VALUE "InternalName", "spdlog.dll\0"
VALUE "LegalCopyright", "Copyright (C) spdlog\0"
VALUE "ProductName", "spdlog\0"
VALUE "ProductVersion", "@SPDLOG_VERSION@.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END