Giter Club home page Giter Club logo

dagame-sfml-ver's Introduction

DaGame (SFML)

CI

Installation

  1. If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:

    sudo apt update
    sudo apt install \
        libxrandr-dev \
        libxcursor-dev \
        libudev-dev \
        libfreetype-dev \
        libopenal-dev \
        libflac-dev \
        libvorbis-dev \
        libgl1-mesa-dev \
        libegl1-mesa-dev
    
  2. Configure and build your project. Most popular IDEs support CMake projects with very little effort on your part.

    Using CMake from the command line is straightforward as well.

    For a single-configuration generator (typically the case on Linux and macOS):

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    cmake --build build
    

    For a multi-configuration generator (typically the case on Windows):

    cmake -S . -B build
    cmake --build build --config Release
    
  3. Enjoy!

Development

But I want to...

Modify CMake options by adding them as configuration parameters (with a -D flag) or by modifying the contents of CMakeCache.txt and rebuilding.

Use Static Libraries

By default, SFML builds shared libraries and this default is inherited by your project. CMake's BUILD_SHARED_LIBS option lets you pick static or shared libraries for the entire project.

Change Compilers

See the variety of CMAKE_<LANG>_COMPILER options. In particular, you'll want to modify CMAKE_CXX_COMPILER to point to the C++ compiler you wish to use.

Change Compiler Optimizations

CMake abstracts away specific optimizer flags through the CMAKE_BUILD_TYPE option. By default, this project recommends Release builds which enable optimizations. Other build types include Debug builds which enable debug symbols but disable optimizations. If you're using a multi-configuration generator (as is often the case on Windows), you can modify the CMAKE_CONFIGURATION_TYPES option.

Change Generators

While CMake will attempt to pick a suitable default generator, some systems offer a number of generators to choose from. Ubuntu, for example, offers Makefiles and Ninja as two potential options. For a list of generators, click here. To modify the generator you're using you must reconfigure your project providing a -G flag with a value corresponding to the generator you want. You can't simply modify an entry in the CMakeCache.txt file unlike the above options. Then you may rebuild your project with this new generator.

More Reading

Here are some useful resources if you want to learn more about CMake:

License

The source code licensed under GPL v3

dagame-sfml-ver's People

Contributors

txmat avatar dhs5 avatar custromix avatar l0lman01 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.