MSVCVer.cmake 632 B

12345678910111213141516171819202122232425262728293031323334353637
  1. if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
  2. SET(SYS WASM)
  3. SET(VC Linux)
  4. elseif(MSVC)
  5. set(SYS win)
  6. if (MSVC14)
  7. SET(VC VC140)
  8. endif()
  9. if(MSVC12)
  10. SET(VC VC120)
  11. endif()
  12. if(MSVC10)
  13. SET(VC VC100)
  14. endif()
  15. message("MSVC_VERSION is ${MSVC_VERSION}")
  16. ELSE()
  17. set(SYS linux)
  18. IF(APPLE)
  19. SET(VC APPLE)
  20. ELSE()
  21. SET(VC Linux)
  22. add_definitions(-DLINUX)
  23. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
  24. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
  25. ENDIF()
  26. endif()
  27. if (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
  28. SET(CPU x64)
  29. else()
  30. SET(CPU x86)
  31. endif()
  32. message("SYS is ${SYS}")
  33. message("VC is ${VC}")
  34. message("CPU is ${CPU}")