File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -1028,7 +1028,7 @@ source_group("CPP/7zip/Crypto"
1028
1028
1029
1029
if (LIBPLZMA_OPT_SHARED )
1030
1030
add_library (plzma SHARED ${LIBPLZMA_SOURCES} ${LIBPLZMA_PUBLIC_HEADERS} ${LIBPLZMA_INTERNAL_HEADERS} )
1031
- set_property (TARGET plzma APPEND PROPERTY COMPILE_FLAGS -DLIBPLZMA_SHARED )
1031
+ set_property (TARGET plzma APPEND PROPERTY COMPILE_FLAGS -DLIBPLZMA_SHARED=1 )
1032
1032
if (MSVC )
1033
1033
message ("Shared lib. MSVC" )
1034
1034
# MSVC does not append 'lib' - do it here to have consistent name
@@ -1045,7 +1045,7 @@ endif()
1045
1045
1046
1046
if (LIBPLZMA_OPT_STATIC )
1047
1047
add_library (plzma_static STATIC ${LIBPLZMA_SOURCES} ${LIBPLZMA_PUBLIC_HEADERS} ${LIBPLZMA_INTERNAL_HEADERS} )
1048
- set_property (TARGET plzma_static APPEND PROPERTY COMPILE_FLAGS -DLIBPLZMA_STATIC )
1048
+ set_property (TARGET plzma_static APPEND PROPERTY COMPILE_FLAGS -DLIBPLZMA_STATIC=1 )
1049
1049
if (MSVC )
1050
1050
# MSVC does not append 'lib' - do it here to have consistent name
1051
1051
set_target_properties (plzma_static PROPERTIES PREFIX "lib" )
Original file line number Diff line number Diff line change 53
53
#define LIBPLZMA_VERSION_PATCH 4
54
54
55
55
// check windows
56
- #if defined(WIN32 ) || defined(_WIN32 ) || defined(WIN32_LEAN_AND_MEAN ) || defined(_WIN64 ) || defined(WIN64 )
56
+ #if defined(WIN32 ) || defined(_WIN32 ) || defined(_WIN64 ) || defined(WIN64 ) || defined(WIN32_LEAN_AND_MEAN )
57
57
# define LIBPLZMA_OS_WINDOWS 1
58
58
#endif
59
59
80
80
81
81
// if not using/building shared or static, then static
82
82
#if !defined(LIBPLZMA_SHARED ) && !defined(LIBPLZMA_STATIC )
83
- # define LIBPLZMA_STATIC
83
+ # if defined(LIBPLZMA_OS_WINDOWS ) && (defined(_MSC_VER ) || defined(_MSC_FULL_VER ))
84
+ # if defined(_MT ) && (_MT > 0 )
85
+ # if defined(_DLL )
86
+ # define LIBPLZMA_SHARED 1
87
+ # else
88
+ # define LIBPLZMA_STATIC 1
89
+ # endif // _DLL
90
+ # endif // _MT
91
+ # endif // LIBPLZMA_OS_WINDOWS && (_MSC_VER || _MSC_FULL_VER)
92
+ # if !defined(LIBPLZMA_SHARED ) && !defined(LIBPLZMA_STATIC )
93
+ # define LIBPLZMA_STATIC 1
94
+ # endif
84
95
#endif
85
96
86
97
// dll api
Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ const char * LIBPLZMA_NONNULL plzma_version(void) {
244
244
#endif
245
245
246
246
#if defined(LIBPLZMA_MSC)
247
+ // https://learn.microsoft.com/en-us/cpp/overview/compiler-versions
247
248
# if defined(_MSC_FULL_VER)
248
249
" : MSVC-" LIBPLZMA_TOSTRING (_MSC_FULL_VER)
249
250
# elif defined(_MSC_VER)
@@ -256,12 +257,12 @@ const char * LIBPLZMA_NONNULL plzma_version(void) {
256
257
# if defined(_DLL)
257
258
// Causes the application to use the multithread-specific and DLL-specific version of the run-time library.
258
259
// Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file.
259
- " , multithreaded DLL"
260
+ " : multithreaded DLL"
260
261
# else
261
262
// Causes the application to use the multithread, static version of the run-time library.
262
263
// Defines _MT and causes the compiler to place the library name LIBCMT.lib into the .obj file
263
264
// so that the linker will use LIBCMT.lib to resolve external symbols.
264
- " , multithreaded"
265
+ " : multithreaded"
265
266
# endif // _DLL
266
267
# endif // _MT && _MT > 0
267
268
#endif
You can’t perform that action at this time.
0 commit comments