Code Monkey home page Code Monkey logo

glfw-cmake-starter's Introduction

Support our work through GitHub Sponsors or Patreon

Become a Patron

GLFW CMake starter

This starter project shows how to use CMake to create a project with GLFW. The code is multi-platform and runs on Windows, Linux and MacOS.

GLFW homepage: glfw.org
GLFW on GitHub: github.com/glfw/glfw

Getting the code

The easiest way to get hold of the starter code is to run the following command using a shell you can run git from:

git clone --recursive https://github.com/juliettef/GLFW-CMake-starter

If you are on Windows you can download git from git-scm.com/download/win and use the right click menu in Windows File Explorer to "Git Bash here" and then run git commands.

This will create the directory GLFW-CMake-starter and get the latest source code, using the --recursive option to download the GLFW code which is included in the repository as a submodule. If you want to run further git commands from the command line you'll need to cd into the directory:

cd GLFW-CMake-starter

Alternatively you can use a git GUI program such as Fork to get the code. Most of these will automatically download the git submodules.

If you download the code from GitHub via the "Download ZIP" approach, you'll also need to download GLFW into the glfw folder. The correct version can be found by clicking on the glfw folder you see on the front page of the GLFW-CMake-starter GitHub repository.

Using CMake to create the project

From a command prompt in the GLFW-CMake-starter directory:

  1. mkdir build
  2. cd build
  3. cmake .. (for MinGW the build system generator needs to be specified using the -G option: cmake .. -G "MinGW Makefiles")
  4. Either run make all or for Visual Studio open GLFW-CMake-starter.sln or for MinGW run mingw32-make

glfw-cmake-starter's People

Contributors

juliettef avatar elmindreda avatar dougbinks avatar supremestranger avatar bozgi 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.