WIN32_LEAN_AND_MEAN propagated with exiv2lib target

This commit is contained in:
Luis Díaz Más
2020-10-06 22:48:38 +02:00
parent b304244766
commit 30773c92a3
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ if(MSVC)
# Object Level Parallelism
add_compile_options(/MP)
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX) # This definition is not only needed for Exiv2 but also for xmpsdk
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
if (MSVC_VERSION GREATER_EQUAL "1910") # VS2017 and up
+3 -1
View File
@@ -192,7 +192,9 @@ if (EXIV2_ENABLE_WEBREADY)
endif()
if (WIN32)
target_compile_definitions(exiv2lib PRIVATE PSAPI_VERSION=1) # to be compatible with <= WinVista (#905)
target_compile_definitions(exiv2lib PRIVATE PSAPI_VERSION=1) # to be compatible with <= WinVista (#905)
# Since windows.h is included in some headers, we need to propagate this definition
target_compile_definitions(exiv2lib PUBLIC WIN32_LEAN_AND_MEAN)
endif()
if (NOT MSVC)