Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion BUILDING
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
How to build cerritos

1. Install dependencies
cmake libsdl2 doxygen graphviz libsdl2-image-dev libsdl2-ttf-dev
Linux (package names may vary):
{your packager} libsdl2 doxygen graphviz libsdl2-image-dev libsdl2-ttf-dev freealut-dev
macOS:
brew install sdl2 doxygen graphviz sdl2_image sdl2_ttf freealut

2. Create build directory
mkdir build
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

include(sdl)
INCLUDE(FindPkgConfig)
find_package(OpenAL REQUIRED)
#find_package(SDL_ttf REQUIRED)
#PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image)
Expand Down
16 changes: 9 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ install(FILES
)

target_include_directories(cerritos PUBLIC
${SDL2_LIBRARIES}
${SDL2IMAGE_INCLUDE_DIRS}
${SDL2TTF_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIRS}
.
backend
core
Expand All @@ -85,14 +81,20 @@ target_include_directories(cerritos PUBLIC
widgets
)

target_include_directories(cerritos SYSTEM PUBLIC
${SDL2_INCLUDE_DIRS}
${SDL2IMAGE_INCLUDE_DIRS}
${SDL2TTF_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIR}
)

target_link_libraries(cerritos
${SDL2_LIBRARIES}
${SDL2IMAGE_LIBRARIES}
${SDL2TTF_LIBRARIES}
${OPENAL_LIBRARIES}
${OPENAL_LIBRARY}
alut
stdc++fs
stdc++
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.1>>:stdc++fs>
)

install(TARGETS cerritos
Expand Down
4 changes: 4 additions & 0 deletions src/thirdparty/binreloc/binreloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef __APPLE__
#include <sys/syslimits.h>
#else
#include <linux/limits.h>
#endif

#include "binreloc.h"

Expand Down