Coder Social home page Coder Social logo

ytljc2003 / cmakedemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from preshing/cmakedemo

0.0 1.0 0.0 86 KB

An example cross-platform CMake-based project using SDL2 and OpenGL

License: Other

CMake 0.95% C++ 62.55% Objective-C 0.29% C 36.01% Python 0.19%

cmakedemo's Introduction

An example cross-platform CMake-based project.

This project uses SDL2 and OpenGL to render a spinning 3D logo to a desktop window. You can build it on Windows, MacOS or Linux.

Requirements

Windows (Visual Studio)

CMakeDemo expects to find the SDL2 headers and libraries in a subfolder named extern\SDL-2.0.5. You can download and extract them automatically by running the Python 3 script setup-win32.py. If you don't have Python installed, download and extract them by hand.

On Windows, CMakeDemo uses its own OpenGL headers and loads opengl32.dll dynamically at runtime. Nothing else is needed at build time.

MacOS (Xcode)

Install the SDL2 headers and libraries using MacPorts.

sudo port install libsdl2

OpenGL headers and libraries are installed by Xcode. CMake will find them automatically.

Ubuntu

Install the SDL2 headers and libraries.

sudo apt install libsdl2-dev

OpenGL headers and libraries are already present on the system. CMake will find them automatically.

Build Instructions

For build instructions, see the blog post How to Build a CMake-Based Project.

cmakedemo's People

Contributors

preshing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.