Coder Social home page Coder Social logo

deepdarkseafishery's Introduction

DeepDarkSeaFishery

DeepDarkSeaFishery

Requirement for building

  • CMake (>= 3.0)
  • C++ Compiler (Support almost cpp14 feature)
  • SDL2 (place into ext directory or system directory)
  • SDL2_image (place into ext directory or system directory)

How to build

  1. Download SDL2 Development Library from https://www.libsdl.org/download-2.0.php
  2. Download SDL2_image Development Library from https://www.libsdl.org/projects/SDL_image/
  3. Extract both into ext folder
  4. make build directory(usually build)
  5. run cmake at build directory - use proper generator
  • You can check available generator via running cmake --help
  • Example for xcode : cmake -GXcode ..

How to add new source files

All sources are placed under the src folder. Each folder that containing source files also contains CMakeLists.txt. Source file list is managed by CMakeLists.txt. So, you should update proper CMakeLists.txt to add new source file. Below is an example adding new src/new_feature.cpp and src/new_feature.h.

Original a part of CMakeLists.txt in src

add_sources(
  Sources
  ${R}/main.cpp
  ${R}/platform.h)

After add files

add_sources(
  Sources
  ${R}/main.cpp
  ${R}/platform.h
  ${R}/new_feature.h
  ${R}/new_feature.cpp)

How to add new resource file?

All resources are placed under res folder. Update res/CMakeLists.txt.

Too annoying. Why should use cmake?

Because C++ is sucks for building on many platforms. CMake can handle it, can works with many compilers - VC, clang, gcc.

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.