GameAnalytics / GA-SDK-CPP

Repository for GameAnalytics C++ SDK.
MIT License
20 stars 16 forks source link

Compiling with VS 2022 #123

Open Withaust opened 1 year ago

Withaust commented 1 year ago

For people that might have been experiencing the same problem as I have, in order to compile with the latest version of CMake for VS2022 support, here is what you need to do: 1) Open build\jenkins\CMakeIncludes\eval_condition_macro.cmake 2) Replace

MACRO(EVAL_CONDITION name)
   IF(${ARGN})
     SET(${name} 1)
   ELSE(${ARGN})
     SET(${name} 0)
   ENDIF(${ARGN})
ENDMACRO(EVAL_CONDITION)

with

MACRO(EVAL_CONDITION name)
   IF(ARGN)
     SET(${name} 1)
   ELSE(ARGN)
     SET(${name} 0)
   ENDIF(ARGN)
ENDMACRO(EVAL_CONDITION)

3) Open build\cmake\gameanalytics\CMakeLists.txt in CMake 4) After our replacement it would spew out a bunch of warnings on configuration, but now it would actually be able to configure and generate a solution for VS 2022. image