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
922 stars 205 forks source link

Unknown CMake command "target_precompile_headers". #911

Closed aismann closed 2 years ago

aismann commented 2 years ago

Deleted axmol folder. clone it again (all new, no old stuff on it)

cmake -S . -B build_64 -G "Visual Studio 16 2019" -A x64

-- Including Win32 support -- AX_USE_ALSOFT= CMake axmol target_precompile_headers **CMake Error at core/CMakeLists.txt:161 (target_precompile_headers): Unknown CMake command "target_precompile_headers".**

halx99 commented 2 years ago

which your cmake version?

halx99 commented 2 years ago

Maybe @crazyhappygame can help to take a look.

aismann commented 2 years ago

D:__GitHub_aismann\axmol>cmake -version cmake version 3.15.0

crazyhappygame commented 2 years ago

target_precompile_headers is available starting from cmake 3.16. could you update cmake Version?

aismann commented 2 years ago

target_precompile_headers is available starting from cmake 3.16. could you update cmake Version?

@crazyhappygame Please update readme also

aismann commented 2 years ago

Updateted: D:__GitHub_aismann\axmol>cmake -version cmake version 3.24.2

generated: axmol.sln

but: CMake Error in tests/cpp-tests/CMakeLists.txt: Unable to resolve full path of PCH-header 'D:/__GitHub/_aismann/axmol/build_64/engine/axmol/core/CMakeFiles/axmol.dir/RelWithDebInfo/cmake_pch.h' assigned to target cpp_tests, although its path is supposed to be known!

aismann commented 2 years ago

Compiling: VS2019 64bit (372 errors like below)

11>D:__GitHub_aismann\axmol\tests\cpp-tests\Classes\ChipmunkTestBed\ChipmunkTestBed.cpp : error C2855: command-line option '/Z7' inconsistent with precompiled header

D:__GitHub_aismann\axmol\tests\cpp-tests\Classes\ChipmunkTestBed\ChipmunkTestBed.cpp : fatal error C1903: unable to recover from previous error(s); stopping compilation 11

aismann commented 2 years ago

works with cmake update