CMake.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 1. Start from readme.txt
  2. 2. How to build and run Oxygine on Windows with CMake and Visual Studio (tested with VS2010, VS2012, VS2013 and VS2015). Steps:
  3. =================================================================================================
  4. - Build SDL2
  5. - see oxygine-framework/readme/VisualStudio.txt
  6. - Find and copy compiled SDL2 libraries to oxygine-framework/libs:
  7. - SDL2.lib
  8. - SDL2main.lib
  9. - SDL2.dll
  10. - select any example from examples folder. I chose Demo
  11. - Go to folder oxygine-framework/examples/Demo/proj.cmake
  12. - run: cmake .
  13. - Open generated solution.
  14. - Select Demo project and set it "as startup project".
  15. - set working directory for Demo project to "..\data"
  16. (right mouse click on Demo -> project->properties->ConfigurationProperties->Debugging->WorkingDirectory)
  17. - copy all dlls from oxygine-framework\oxygine\third_party\win32\dlls\
  18. and SDL2.dll from oxygine-framework/libs
  19. to oxygine-framework\examples\Demo\data\
  20. - Ready! run!
  21. 3. How to build and run Oxygine on Linux with CMake & make
  22. =================================================================================================
  23. Make and install SDL2
  24. - Use apt-get to install packages (apt-get install package-name-here):
  25. - libjpeg8-dev zlib1g-dev libpng12-dev
  26. - freeglut3 (needed only opengl)
  27. - Go to oxygine-framework/examples/Demo (or any other example)
  28. - Go to folder proj.cmake
  29. - exec shell script "run.sh":
  30. ./run.sh
  31. =================================================================================================
  32. 4. You could generate your own CMake configuration
  33. - You need Python 2.7 installed
  34. - You need to run this script
  35. oxygine-framework\tools\gen_template.py
  36. example:
  37. python gen_template.py MyProject -t cmake -d path/to/MyProject/