cmakelist: fix msvc defs leaking to other platform

The MSVC_VERSION check was kicking in on Linux (and presumably OSX),
and causing redefines of `inline` and `snprintf`, and failing the
build with  lots of "undefined reference to `_snprintf'" errors.
This commit is contained in:
Ben Campbell 2017-09-23 09:53:03 +12:00
parent 27c914664c
commit 169eae2ba5
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ else()
set(LOVR_HEADSET src/headset/openvr.c)
endif()
if (MSVC_VERSION VERSION_LESS 1900)
if ((WIN32) AND (MSVC_VERSION VERSION_LESS 1900))
add_definitions(-Dinline=__inline)
add_definitions(-Dsnprintf=_snprintf)
endif()