project('mglpp', ['cpp'], version : '1.0.0', default_options : ['warning_level=2'], subproject_dir : 'depends') if get_option('buildtype') == 'debug' add_project_arguments('-g3', language : ['cpp']) elif get_option('buildtype') == 'release' add_project_arguments('-DNDEBUG', language : ['cpp']) endif src = [ 'src/graphics/Text.cpp', 'src/graphics/Image.cpp', 'src/graphics/Font.cpp', 'src/graphics/VertexBuffer.cpp', 'src/graphics/Rectangle.cpp', 'src/graphics/Texture.cpp', 'src/graphics/Sprite.cpp', 'src/graphics/Shader.cpp', 'src/system/MemoryMappedFile.cpp', 'src/system/Clock.cpp', 'src/system/Utf8.cpp', 'src/window/Window.cpp', 'src/mglpp.cpp', ] project_headers = [ 'include/mglpp/graphics/Text.hpp', 'include/mglpp/graphics/PrimitiveType.hpp', 'include/mglpp/graphics/Vertex.hpp', 'include/mglpp/graphics/Drawable.hpp', 'include/mglpp/graphics/Texture.hpp', 'include/mglpp/graphics/Shader.hpp', 'include/mglpp/graphics/Sprite.hpp', 'include/mglpp/graphics/Color.hpp', 'include/mglpp/graphics/VertexBuffer.hpp', 'include/mglpp/graphics/Image.hpp', 'include/mglpp/graphics/Font.hpp', 'include/mglpp/graphics/Rectangle.hpp', 'include/mglpp/system/Utf8.hpp', 'include/mglpp/system/vec.hpp', 'include/mglpp/system/Clock.hpp', 'include/mglpp/system/MemoryMappedFile.hpp', 'include/mglpp/system/FloatRect.hpp', 'include/mglpp/mglpp.hpp', 'include/mglpp/window/Window.hpp', 'include/mglpp/window/Mouse.hpp', 'include/mglpp/window/Event.hpp', 'include/mglpp/window/Keyboard.hpp', 'include/mglpp/window/Clipboard.hpp', ] mgl_proj = subproject('mgl') mgl_dep = mgl_proj.get_variable('mgl_dep') dep = [ mgl_dep, ] public_headers = include_directories('include') project_target = static_library( meson.project_name(), src, install : false, include_directories : public_headers, dependencies : dep, ) project_dep = declare_dependency(include_directories : public_headers, link_with : project_target) set_variable(meson.project_name() + '_dep', project_dep) #install_headers(project_headers, subdir : meson.project_name(), preserve_path : true) # pkg_mod = import('pkgconfig') # pkg_mod.generate( # name : meson.project_name(), # filebase : meson.project_name(), # description : 'Minimal Graphics Library', # subdirs : meson.project_name(), # libraries : project_target, # ) # if not meson.is_subproject() # subdir('tests') # test('tests', # executable('run_tests', # files(['tests/main.cpp']), # dependencies : [project_dep, test_dep], # install : false # ) # ) # endif