README.cmake 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. CMake Build Instructions
  2. NB. Depending on your host system your Generator flag -G may be different
  3. Typical -G options
  4. For using gcc and clang from a makefile
  5. msys2 = "MSYS Makefiles"
  6. windows = "MinGW Makefiles"
  7. nix and mac = "Unix Makefiles"
  8. For using and editor such as Visual Studio or xcode or sublime text there are different flags
  9. To like all available flags for your system run
  10. cmake --help
  11. More Examples
  12. mac build Instructions
  13. cd cocos2d-x
  14. mkdir macbuild && cd macbuild
  15. cmake -G "Unix Makefiles" -DBUILD_CPP_TESTS=OFF -DBUILD_LUA_LIBS=OFF ..
  16. Android Build Instructions
  17. cd cocos2d-x
  18. mkdir androidbuild && cd androidbuild
  19. cmake -G"MSYS Makefiles" -DANDROID_NDK=/path/to/android-ndk-r9d -DANDROID_NATIVE_API_LEVEL=android-9 -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake ..
  20. mingw64 with msys2 build Instructions
  21. cd cocos2d-x
  22. mkdir mingwbuild && cd mingwbuild
  23. cmake -G "MSYS Makefiles" -DBUILD_CPP_TESTS=OFF -DBUILD_LUA_LIBS=OFF ..
  24. todo: structure this document in markdown with better examples and more details