Skip to content

Commit

Permalink
More work on vendored extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtCoDFish committed Mar 18, 2018
1 parent 0cfa0bc commit d0a43c9
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ set(VENDOR_ZLIB_FILES
)
set(VENDOR_ZLIB_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/vendor/zlib)

set(VENDOR_GLM_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/vendor/glm/glm)
set(VENDOR_GLM_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/vendor/glm)
set(VENDOR_RAPIDJSON_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/vendor/rapidjson/include)

set(VENDOR_FILES
Expand Down Expand Up @@ -167,7 +167,7 @@ message(${CMAKE_CXX_FLAGS_BASE})

include_directories(
"include"
${GLM_INCLUDE_DIRS}
${PROJECT_BINARY_DIR}
${VENDOR_INCLUDE_DIRS}
)

Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,28 @@ The design is heavily inspired by [LibGDX](https://github.com/libgdx/libgdx/).
stop having to worry about cleanup.

## How To Use
## Cloning
Most of APG's dependencies are vendored using git submodules, so just cloning the repository won't be enough to get all the code. You can do something like the following:
```bash
# Clone APG as usual, and cd into the directory
g submodule update --init --recursive # this will fetch all the dependencies at the correct commit
```
### Dependencies for Build
#### macOS
You'll need Homebrew installed.

```bash
brew install sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_net sdl2_ttf glew glm rapidjson tinyxml2
```
#### Linux
Can all be done through a package manager; details coming soon.

#### Linux Deb-based (Debian, Ubuntu, etc.)
You should be able to install the dependencies you need through your package manager.

```bash
sudo apt install git cmake # basic build dependencies; you'll also need a compiler (something like build-essential)
# Now install library dependencies which are not vendored
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libglew-dev
```

#### Windows
Coming soon!
Expand Down
4 changes: 1 addition & 3 deletions include/APG/graphics/Tileset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
#include <string>
#include <memory>

#include "tmxparser/TmxMap.h"
#include "tmxparser/TmxTileset.h"
#include "tmxparser/TmxImage.h"
#include "Tmx.h"

#include "APG/core/APGeasylogging.hpp"
#include "APG/graphics/Texture.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/test/APGGLRenderTest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <SDL2/SDL.h>

#include "tmxparser/TmxMap.h"
#include "Tmx.h"

#include "APG/SXXDL.hpp"
#include "APG/core/Game.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/AnimatedSprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <utility>
#include <iostream>

#include "tmxparser/TmxTile.h"
#include "Tmx.h"

#include "APG/graphics/AnimatedSprite.hpp"
#include "APG/graphics/Texture.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/graphics/Camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
#include <glm/vec3.hpp>
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include "APG/graphics/Camera.hpp"

const glm::mat4 APG::Camera::IDENTITY;
const glm::mat4 APG::Camera::IDENTITY {};

APG::Camera::Camera(float viewportWidth, float viewportHeight) {
setToOrtho(false, viewportWidth, viewportHeight);
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/GLTmxRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <glm/vec2.hpp>

#include "tmxparser/Tmx.h"
#include "Tmx.h"

#include "APG/graphics/Sprite.hpp"
#include "APG/tiled/GLTmxRenderer.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/SDLTmxRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <string>
#include <sstream>

#include "tmxparser/Tmx.h"
#include "Tmx.h"

#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
Expand Down
9 changes: 1 addition & 8 deletions src/tiled/TmxRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@

#include <glm/vec2.hpp>

#include "tmxparser/TmxMap.h"
#include "tmxparser/TmxLayer.h"
#include "tmxparser/TmxTileset.h"
#include "tmxparser/TmxImage.h"
#include "tmxparser/TmxTile.h"
#include "tmxparser/TmxTileLayer.h"
#include "tmxparser/TmxObjectGroup.h"
#include "tmxparser/TmxObject.h"
#include "Tmx.h"

#include "APG/SXXDL.hpp"
#include "APG/core/APGeasylogging.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test/APGSDLRenderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include <GL/gl.h>
#endif

#include <tmxparser/Tmx.h>
#include "Tmx.h"

#include "APG/SXXDL.hpp"
#include "APG/core/APGeasylogging.hpp"
Expand Down

0 comments on commit d0a43c9

Please sign in to comment.