Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add meson build project #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
41 changes: 41 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project('NonEuclidean', 'cpp', default_options: ['warning_level=3', 'cpp_std=c++14'])

gl_dep = dependency('gl')

glew_dep = dependency('glew', method: 'pkg-config', required: false)
if not glew_dep.found()
glew_dep = dependency('glew', static: true, required: true)
endif

game_objects_src = [
'NonEuclidean/Player.cpp',
'NonEuclidean/Portal.cpp',
]
scenes_src = [
'NonEuclidean/Level1.cpp',
'NonEuclidean/Level2.cpp',
'NonEuclidean/Level3.cpp',
'NonEuclidean/Level4.cpp',
'NonEuclidean/Level5.cpp',
'NonEuclidean/Level6.cpp',
]
engine_src = [
'NonEuclidean/Camera.cpp',
'NonEuclidean/Collider.cpp',
'NonEuclidean/Engine.cpp',
'NonEuclidean/FrameBuffer.cpp',
'NonEuclidean/Input.cpp',
'NonEuclidean/Main.cpp',
'NonEuclidean/Mesh.cpp',
'NonEuclidean/Object.cpp',
'NonEuclidean/Physical.cpp',
'NonEuclidean/Resources.cpp',
'NonEuclidean/Shader.cpp',
'NonEuclidean/Texture.cpp',
]

executable('NonEuclidean',
dependencies: [gl_dep, glew_dep],
include_directories: include_directories('NonEuclidean'),
gui_app: true,
sources: game_objects_src + scenes_src + engine_src)
12 changes: 12 additions & 0 deletions subprojects/glew.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[wrap-file]
directory = glew-2.2.0
source_url = http://downloads.sourceforge.net/glew/glew-2.2.0.tgz
source_filename = glew-2.2.0.tgz
source_hash = d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1
patch_filename = glew_2.2.0-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/glew_2.2.0-2/get_patch
patch_hash = df7bc80456da53f83e93e89ca5035d04cdff19a836c956887a684b2bee16eb9b
wrapdb_version = 2.2.0-2

[provide]
glew = glew_dep