Updated verion.rc and CMakeLists.txt for dll build

This commit is contained in:
Gabi Melman 2020-03-12 14:35:30 +02:00
parent b309a88bea
commit b4a1b4b59a
5 changed files with 1046 additions and 7 deletions

View File

@ -122,8 +122,12 @@ if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
list(APPEND SPDLOG_SRCS src/fmt.cpp) list(APPEND SPDLOG_SRCS src/fmt.cpp)
endif() endif()
if(WIN32 AND SPDLOG_BUILD_SHARED)
list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()
if (SPDLOG_BUILD_SHARED) if (SPDLOG_BUILD_SHARED)
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB) target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
if(WIN32) if(WIN32)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275) target_compile_options(spdlog PUBLIC /wd4251 /wd4275)

View File

@ -22,12 +22,12 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "FileDescription", "spdlog dll" VALUE "FileDescription", "spdlog dll\0"
VALUE "FileVersion", "@SPDLOG_VERSION@.0" VALUE "FileVersion", "@SPDLOG_VERSION@.0\0"
VALUE "InternalName", "spdlog.dll" VALUE "InternalName", "spdlog.dll\0"
VALUE "LegalCopyright", "Copyright (C) spdlog" VALUE "LegalCopyright", "Copyright (C) spdlog\0"
VALUE "ProductName", "spdlog" VALUE "ProductName", "spdlog\0"
VALUE "ProductVersion", "@SPDLOG_VERSION@.0" VALUE "ProductVersion", "@SPDLOG_VERSION@.0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -0,0 +1,136 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"childIndexes" :
[
1,
2
],
"hasInstallRule" : true,
"minimumCMakeVersion" :
{
"string" : "3.2"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
1
]
},
{
"build" : "example",
"minimumCMakeVersion" :
{
"string" : "3.1"
},
"parentIndex" : 0,
"projectIndex" : 1,
"source" : "example",
"targetIndexes" :
[
0
]
},
{
"build" : "tests",
"minimumCMakeVersion" :
{
"string" : "3.2"
},
"parentIndex" : 0,
"projectIndex" : 2,
"source" : "tests",
"targetIndexes" :
[
2
]
}
],
"name" : "Debug",
"projects" :
[
{
"childIndexes" :
[
1,
2
],
"directoryIndexes" :
[
0
],
"name" : "spdlog",
"targetIndexes" :
[
1
]
},
{
"directoryIndexes" :
[
1
],
"name" : "spdlog_examples",
"parentIndex" : 0,
"targetIndexes" :
[
0
]
},
{
"directoryIndexes" :
[
2
],
"name" : "spdlog_utests",
"parentIndex" : 0,
"targetIndexes" :
[
2
]
}
],
"targets" :
[
{
"directoryIndex" : 1,
"id" : "example::@70983d692f648185febe",
"jsonFile" : "target-example-Debug-2de1719d268d7c2e63a2.json",
"name" : "example",
"projectIndex" : 1
},
{
"directoryIndex" : 0,
"id" : "spdlog::@6890427a1f51a3e7e1df",
"jsonFile" : "target-spdlog-Debug-21e5be96c52e9f8540ea.json",
"name" : "spdlog",
"projectIndex" : 0
},
{
"directoryIndex" : 2,
"id" : "spdlog-utests::@a44f0ac069e85531cdee",
"jsonFile" : "target-spdlog-utests-Debug-2d48a2f3516d0eeb0bbd.json",
"name" : "spdlog-utests",
"projectIndex" : 2
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "C:/devel/spdlog/out/build/x64-Debug",
"source" : "C:/devel/spdlog"
},
"version" :
{
"major" : 2,
"minor" : 0
}
}

View File

@ -0,0 +1,109 @@
{
"cmake" :
{
"generator" :
{
"name" : "Ninja"
},
"paths" :
{
"cmake" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe",
"cpack" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe",
"ctest" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe",
"root" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.15"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 15,
"patch" : 19101501,
"string" : "3.15.19101501-MSVC_2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-652fecc897c1be9b5385.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cache-v2-881185b6b6c12f781e9f.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-e731e878bbc150c81804.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"client-MicrosoftVS" :
{
"query.json" :
{
"requests" :
[
{
"kind" : "cache",
"version" : 2
},
{
"kind" : "cmakeFiles",
"version" : 1
},
{
"kind" : "codemodel",
"version" : 2
}
],
"responses" :
[
{
"jsonFile" : "cache-v2-881185b6b6c12f781e9f.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-e731e878bbc150c81804.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "codemodel-v2-652fecc897c1be9b5385.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 0
}
}
]
}
}
}
}

View File

@ -0,0 +1,790 @@
{
"artifacts" :
[
{
"path" : "spdlogd.dll"
},
{
"path" : "spdlogd.lib"
},
{
"path" : "spdlogd.pdb"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_library",
"install",
"target_include_directories",
"target_compile_definitions"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 130,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 274,
"parent" : 0
},
{
"command" : 2,
"file" : 0,
"line" : 146,
"parent" : 0
},
{
"command" : 3,
"file" : 0,
"line" : 137,
"parent" : 0
},
{
"command" : 3,
"file" : 0,
"line" : 145,
"parent" : 0
},
{
"command" : 3,
"file" : 0,
"line" : 131,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /wd4251 /wd4275 /W4 /WX"
}
],
"defines" :
[
{
"backtrace" : 4,
"define" : "FMT_EXPORT"
},
{
"backtrace" : 4,
"define" : "FMT_SHARED"
},
{
"backtrace" : 5,
"define" : "SPDLOG_COMPILED_LIB"
},
{
"backtrace" : 6,
"define" : "SPDLOG_SHARED_LIB"
},
{
"define" : "spdlog_EXPORTS"
}
],
"includes" :
[
{
"backtrace" : 3,
"path" : "C:/devel/spdlog/include"
}
],
"language" : "CXX",
"sourceIndexes" :
[
0,
1,
2,
3,
4,
5,
6
]
},
{
"compileCommandFragments" :
[
{
"fragment" : "-DWIN32 -D_DEBUG "
}
],
"defines" :
[
{
"backtrace" : 4,
"define" : "FMT_EXPORT"
},
{
"backtrace" : 4,
"define" : "FMT_SHARED"
},
{
"backtrace" : 5,
"define" : "SPDLOG_COMPILED_LIB"
},
{
"backtrace" : 6,
"define" : "SPDLOG_SHARED_LIB"
},
{
"define" : "spdlog_EXPORTS"
}
],
"includes" :
[
{
"backtrace" : 3,
"path" : "C:/devel/spdlog/include"
}
],
"language" : "RC",
"sourceIndexes" :
[
7
]
}
],
"id" : "spdlog::@6890427a1f51a3e7e1df",
"install" :
{
"destinations" :
[
{
"backtrace" : 2,
"path" : "lib"
},
{
"backtrace" : 2,
"path" : "bin"
}
],
"prefix" :
{
"path" : "C:/devel/spdlog/out/install/x64-Debug"
}
},
"link" :
{
"commandFragments" :
[
{
"fragment" : "/machine:x64 /debug /INCREMENTAL",
"role" : "flags"
},
{
"fragment" : "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "spdlog",
"nameOnDisk" : "spdlogd.dll",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
1,
2,
3,
4,
5,
6,
7
]
},
{
"name" : "Header Files\\spdlog",
"sourceIndexes" :
[
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
]
},
{
"name" : "Header Files\\spdlog\\details",
"sourceIndexes" :
[
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46
]
},
{
"name" : "Header Files\\spdlog\\sinks",
"sourceIndexes" :
[
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74
]
},
{
"name" : "Header Files\\spdlog\\fmt",
"sourceIndexes" :
[
75,
76,
77
]
},
{
"name" : "Header Files\\spdlog\\fmt\\bundled",
"sourceIndexes" :
[
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/spdlog.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/stdout_sinks.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/color_sinks.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/file_sinks.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/async.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/cfg.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/fmt.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 1,
"path" : "out/build/x64-Debug/version.rc",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "include/spdlog/async.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/async_logger-inl.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/async_logger.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/common-inl.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/common.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/formatter.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/logger-inl.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/logger.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/spdlog-inl.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/spdlog.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/tweakme.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/version.h",
"sourceGroupIndex" : 1
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/backtracer-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/backtracer.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/circular_q.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/console_globals.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/file_helper-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/file_helper.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/fmt_helper.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/log_msg-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/log_msg.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/log_msg_buffer-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/log_msg_buffer.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/mpmc_blocking_q.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/null_mutex.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/os-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/os.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/pattern_formatter-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/pattern_formatter.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/periodic_worker-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/periodic_worker.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/registry-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/registry.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/synchronous_factory.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/tcp_client-window.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/tcp_client.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/thread_pool-inl.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/thread_pool.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/details/windows_include.h",
"sourceGroupIndex" : 2
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/android_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/ansicolor_sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/ansicolor_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/base_sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/base_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/basic_file_sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/basic_file_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/daily_file_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/dist_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/dup_filter_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/msvc_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/null_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/ostream_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/ringbuffer_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/rotating_file_sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/rotating_file_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/stdout_color_sinks-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/stdout_color_sinks.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/stdout_sinks-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/stdout_sinks.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/syslog_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/systemd_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/tcp_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/win_eventlog_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/wincolor_sink-inl.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/sinks/wincolor_sink.h",
"sourceGroupIndex" : 3
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bin_to_hex.h",
"sourceGroupIndex" : 4
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/fmt.h",
"sourceGroupIndex" : 4
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/ostr.h",
"sourceGroupIndex" : 4
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/chrono.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/color.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/compile.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/core.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/format-inl.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/format.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/locale.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/ostream.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/posix.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/printf.h",
"sourceGroupIndex" : 5
},
{
"backtrace" : 1,
"path" : "include/spdlog/fmt/bundled/ranges.h",
"sourceGroupIndex" : 5
}
],
"type" : "SHARED_LIBRARY"
}