X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=81adb1ff230494d56167c5e07762492f30fa4a41;hb=360fd94ee4663b2f9e87f83cd1305cc68bf2f388;hp=33daf5b699a493a2184a2fe5c812ba17b1a2dd38;hpb=4aa88e982a95b759d7782ecb6a5c3499e2fd45ee;p=lyx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 33daf5b699..81adb1ff23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -766,10 +766,14 @@ if(WIN32) set(WIN32_CONSOLE WIN32) endif() if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX) + # -DPSAPI_VERSION=1 is needed to run on vista (bug 10186) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX -DPSAPI_VERSION=1) # disable checked iterators for msvc release builds to get maximum speed set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /D_SECURE_SCL=0") else() + # -DPSAPI_VERSION=1 is not needed for mingw, since the mingw psapi.h + # does not use it and always declares the vista compatible API. + # If this ever changes then -DPSAPI_VERSION might be needed here as well. add_definitions(-DWINVER=0x0500) endif() endif()