axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

Opening the project using Visual studio open folder doesn't work #1030

Closed Obg1 closed 1 year ago

Obg1 commented 1 year ago

When opening the project as a folder using the built in Visual studio Cmake support the Cmake generation fails. Changing AXConfigDefine.cmake file to comment out the following lines fixes it:

`# config c standard if(NOT DEFINED CMAKE_C_STANDARD) if (WINDOWS) message(STATUS "CMAKE_HOST_SYSTEM_VERSION: ${CMAKE_HOST_SYSTEM_VERSION}") message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}") message(STATUS "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")

if (${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} VERSION_GREATER_EQUAL "10.0.22000.0")

        #set(CMAKE_C_STANDARD 11)
    #else()
        # windows sdk < 10.0.22000.0, The c11 header stdalign.h was missing, so workaroud fallback C standard to 99
        # refer to: https://github.com/axmolengine/axmol/issues/991
        set(CMAKE_C_STANDARD 99)
    #endif()
else()
    set(CMAKE_C_STANDARD 11)
endif()

endif() `

halx99 commented 1 year ago

Fixed by https://github.com/axmolengine/axmol/commit/4c2df9e581d2b3ef1fb16764a13f0a3580f5ead7