Working ... uh sort of .. on Windows now to try on Linux.
This commit is contained in:
parent
a5c13d8654
commit
8f679dbe65
6 changed files with 66 additions and 37 deletions
32
meson.build
32
meson.build
|
|
@ -30,16 +30,22 @@ if build_machine.system() == 'windows'
|
|||
'-static-libgcc',
|
||||
'-static-libstdc++',
|
||||
'-static',
|
||||
'-lstdc++exp',
|
||||
language: 'cpp',
|
||||
)
|
||||
|
||||
sdl2_main = subproject('sld2').get_variable('sdl2_main')
|
||||
opengl32 = cc.find_library('opengl32', required: true)
|
||||
winmm = cc.find_library('winmm', required: true)
|
||||
gdi32 = cc.find_library('gdi32', required: true)
|
||||
|
||||
vulkan_inc = include_directories('C:/VulkanSDK/1.4.328.1/Include')
|
||||
vulkan = cc.find_library('vulkan-1',
|
||||
dirs: ['C:/VulkanSDK/1.4.328.1/Lib'],
|
||||
has_headers: ['vulkan/vulkan.h'],
|
||||
header_include_directories: [vulkan_inc],
|
||||
required: true)
|
||||
|
||||
dependencies += [
|
||||
opengl32, winmm, gdi32, sdl2_main
|
||||
winmm, gdi32, vulkan
|
||||
]
|
||||
exe_defaults += ['werror=true']
|
||||
|
||||
|
|
@ -63,6 +69,7 @@ elif build_machine.system() == 'darwin'
|
|||
endif
|
||||
|
||||
vma = subproject('vulkan-memory-allocator').get_variable('vma_allocator_dep')
|
||||
# vulkan_headers = subproject('vulkan-headers').get_variable('vulkan_headers_dep')
|
||||
imgui = subproject('imgui').get_variable('imgui_dep')
|
||||
sdl2 = subproject('sdl2').get_variable('sdl2_dep')
|
||||
|
||||
|
|
@ -76,10 +83,20 @@ glm = glm_proj.get_variable('glm_dep')
|
|||
|
||||
|
||||
vk_opts = cmake.subproject_options()
|
||||
vk_opts.add_cmake_defines({
|
||||
'VK_BOOTSTRAP_TEST': false,
|
||||
'VK_BOOTSTRAP_INSTALL': false,
|
||||
})
|
||||
|
||||
if build_machine.system() == 'windows'
|
||||
vk_opts.add_cmake_defines({
|
||||
'VK_BOOTSTRAP_TEST': false,
|
||||
'VK_BOOTSTRAP_INSTALL': false,
|
||||
'VK_BOOTSTRAP_VULKAN_HEADER_DIR': 'C:/VulkanSDK/1.4.328.1/Include'
|
||||
})
|
||||
else
|
||||
vk_opts.add_cmake_defines({
|
||||
'VK_BOOTSTRAP_TEST': false,
|
||||
'VK_BOOTSTRAP_INSTALL': false,
|
||||
})
|
||||
endif
|
||||
|
||||
vkbootstrap_proj = cmake.subproject('vk-bootstrap', options: vk_opts)
|
||||
vkbootstrap = vkbootstrap_proj.get_variable('vk_bootstrap_dep')
|
||||
|
||||
|
|
@ -106,5 +123,6 @@ tests = [
|
|||
executable('hellovulk', sources,
|
||||
cpp_args: cpp_args,
|
||||
link_args: link_args,
|
||||
win_subsystem: 'windows',
|
||||
override_options: exe_defaults,
|
||||
dependencies: dependencies)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue