vulkan-test/meson.build

59 lines
1.5 KiB
Meson
Raw Normal View History

2024-09-25 23:03:56 -04:00
project(
'graphics-test',
'cpp',
version: '0.1.0',
2024-10-16 23:13:55 -04:00
default_options: ['cpp_std=c++26', 'warning_level=everything', 'buildtype=debugoptimized'],
2024-09-25 23:03:56 -04:00
)
cpp = meson.get_compiler('cpp')
common_cpp_args = [
'-Wno-c++20-compat',
'-Wno-c++20-extensions',
'-Wno-c++98-compat',
'-Wno-c++98-compat-pedantic',
'-Wno-disabled-macro-expansion',
'-Wno-missing-prototypes',
'-Wno-padded',
'-Wno-pre-c++20-compat-pedantic',
'-Wno-switch-default',
'-Wno-unsafe-buffer-usage',
'-Wunused-function',
'-fvisibility=hidden',
]
add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp')
deps = [
dependency('fmt', include_type: 'system'),
dependency('glfw3', include_type: 'system'),
dependency('glm', include_type: 'system'),
dependency('vulkan', include_type: 'system'),
2024-09-25 23:03:56 -04:00
]
glslang_dep = cpp.find_library('glslang', required: false)
if not glslang_dep.found()
glslang_dep = dependency('glslang', required: true, include_type: 'system')
endif
spirv_dep = cpp.find_library('SPIRV', required: false)
if not spirv_dep.found()
spirv_dep = dependency('SPIRV', required: true, include_type: 'system')
endif
2024-10-18 13:35:50 -04:00
imgui_dep = dependency('imgui', required: false, include_type: 'system')
if not imgui_dep.found()
imgui_dep = cpp.find_library('imgui', required: true)
endif
deps += [glslang_dep, spirv_dep, imgui_dep]
2024-10-18 13:35:50 -04:00
2024-09-25 23:03:56 -04:00
executable(
'graphics-test',
2024-10-11 00:42:58 -04:00
sources: files('src/main.cpp'),
include_directories: include_directories('include', is_system: true),
2024-09-25 23:03:56 -04:00
dependencies: deps,
2024-10-18 13:35:50 -04:00
)